FieldUtil { public static String fromGetter(String javaMethodName) { if (!isGetter(javaMethodName)) { return javaMethodName; } int cut = javaMethodName.startsWith("get") ? "get".length() : "is".length(); return uncapitalize(javaMethodName.substring(cut, javaMethodName.length())); } private  FieldUtil(); static String fromGetter(String javaMethodName); static boolean isGetter(String javaMethodName);  }
@Test public void fromGetter() throws Exception { assertThat(FieldUtil.fromGetter("GetField")).isEqualTo("GetField"); assertThat(FieldUtil.fromGetter("getField")).isEqualTo("field"); assertThat(FieldUtil.fromGetter("IsField")).isEqualTo("IsField"); assertThat(FieldUtil.fromGetter("isField")).isEqualTo("field"); }