}
return getMethod(type, methodName);
}
private static JMethod getEndMethod(JClassType type, JMethod method) {
Teardown teardown = method.getAnnotation(Teardown.class);
String methodName;
if (teardown != null) {
methodName = teardown.value();
} else {
methodName = new StringBuffer(method.getName()).replace(0,
"test".length(), END_PREFIX).toString();
}
return getMethod(type, methodName);