private boolean isTestMethod(Method m){
  String name=m.getName();
  Class[] parameters=m.getParameterTypes();
  Class returnType=m.getReturnType();
  return parameters.length == 0 && name.startsWith("test") && returnType.equals(Void.TYPE);
}

private boolean isTestMethod ( Method m ) { String name = m . getName ( ) ; Class [ ] parameters = m . getParameterTypes ( ) ; Class returnType = m . getReturnType ( ) ; return parameters . length == 0 && name . startsWith ( "test" ) && returnType . equals ( Void . TYPE ) ; }
check if method is test method . test method is a method name of which starts with " test " , it has no parameters and does not return any results .
