@Test public void humanize_withCamelCaseAndUnderscore(){ JavaToHumanTranslator tested = new JavaToHumanTranslator(); Assert.assertEquals("Camel case and underscore",tested.humanize("CamelCase_And_underscore")); }
public String humanize(final Method method) { if (method.isAnnotationPresent(Text.class)) { return method.getAnnotation(Text.class).value(); } else { return humanize(method.getName()); } }
JavaToHumanTranslator { public String humanize(final Method method) { if (method.isAnnotationPresent(Text.class)) { return method.getAnnotation(Text.class).value(); } else { return humanize(method.getName()); } } }
JavaToHumanTranslator { public String humanize(final Method method) { if (method.isAnnotationPresent(Text.class)) { return method.getAnnotation(Text.class).value(); } else { return humanize(method.getName()); } }  }
JavaToHumanTranslator { public String humanize(final Method method) { if (method.isAnnotationPresent(Text.class)) { return method.getAnnotation(Text.class).value(); } else { return humanize(method.getName()); } }  String humanize(final Method method); String humanize(Class<?> classUnderTest); String humanize(final String javaName); }
JavaToHumanTranslator { public String humanize(final Method method) { if (method.isAnnotationPresent(Text.class)) { return method.getAnnotation(Text.class).value(); } else { return humanize(method.getName()); } }  String humanize(final Method method); String humanize(Class<?> classUnderTest); String humanize(final String javaName);  }