private static boolean isPublicTestMethod(final Method method){
  final String name=method.getName();
  final Class[] parameters=method.getParameterTypes();
  final Class returnType=method.getReturnType();
  return parameters.length == 0 && (name.startsWith("test") || method.getAnnotation(Test.class) != null) && returnType.equals(Void.TYPE) && Modifier.isPublic(method.getModifiers());
}

private static boolean isPublicTestMethod ( final Method method ) { final String name = method . getName ( ) ; final Class [ ] parameters = method . getParameterTypes ( ) ; final Class returnType = method . getReturnType ( ) ; return parameters . length == 0 && ( name . startsWith ( "test" ) || method . getAnnotation ( Test . class ) != null ) && returnType . equals ( Void . TYPE ) && Modifier . isPublic ( method . getModifiers ( ) ) ; }
from junit . test if the method is a junit 3 or 4 test .
