ClassUtils { public static String extractFieldName(String name) { final Matcher matcher = PATTERN.matcher(name); matcher.find(); final String fieldName = matcher.group(2).toLowerCase() + matcher.group(3); return fieldName; }  static String extractFieldName(String name); static boolean isGetter(String name); static final boolean isPrimitiveOrAutoboxed(Class<?> type);  }
@Test public void testExtractFieldName() { assertThat(extractFieldName("getFoobar"), is("foobar")); assertThat(extractFieldName("isFoobar"), is("foobar")); assertThat(extractFieldName("getXYZ"), is("xYZ")); }