EntityInspector { public static String buildFieldName(Method method) { final String methodName = method.getName(); return buildFieldName(methodName); } EntityInspector(Object entity); List<Method> getAuditedAttributes(); Object getAttributeValue(Method method); static ValueFormatter<?> getFormatter(AuditedAttribute annotation); @SuppressWarnings({ "rawtypes", "unchecked" }) static CollectionFormatter<?> getCollectionFormatter(AuditedCollection annotation); static String buildFieldName(Method method);  }
@Test public void testBuildFieldName() { String fieldName = EntityInspector.buildFieldName("getTheAttribute"); assertThat(fieldName, is(equalTo("theAttribute"))); fieldName = EntityInspector.buildFieldName("isValidBla"); assertThat(fieldName, is(equalTo("validBla"))); fieldName = EntityInspector.buildFieldName("someStrangeNameRemainsTheSame"); assertThat(fieldName, is(equalTo("someStrangeNameRemainsTheSame"))); }