@Test public void test_singleAnnotatedField() { ReflectionField field = mock(ReflectionField.class); when(classScanner.scan(asList("some.package.name"))).thenReturn(asList(Person.class, Address.class)); when(fieldLocator.gatherFieldIds(Person.class)).thenReturn(asList("firstName")); when(fieldLocator.locateById(Person.class, "firstName")).thenReturn(field); when(field.getName()).thenReturn("firstName"); ObjectMapping objectMapping = store.find(Person.class); assertNotNull(objectMapping.findDomainField("firstName")); assertEquals(1, objectMapping.getFieldCount()); }
@Override public ObjectMapping find(Class domainClass) { if (getObjectMappingCount() == 0) { initializeObjectMappings(); } return super.find(domainClass); }
AnnotatedObjectMappingStore extends ObjectMappingStore { @Override public ObjectMapping find(Class domainClass) { if (getObjectMappingCount() == 0) { initializeObjectMappings(); } return super.find(domainClass); } }
AnnotatedObjectMappingStore extends ObjectMappingStore { @Override public ObjectMapping find(Class domainClass) { if (getObjectMappingCount() == 0) { initializeObjectMappings(); } return super.find(domainClass); } AnnotatedObjectMappingStore(); protected  AnnotatedObjectMappingStore(RecordPackageClassScanner classScanner, FieldLocator fieldLocator); }
AnnotatedObjectMappingStore extends ObjectMappingStore { @Override public ObjectMapping find(Class domainClass) { if (getObjectMappingCount() == 0) { initializeObjectMappings(); } return super.find(domainClass); } AnnotatedObjectMappingStore(); protected  AnnotatedObjectMappingStore(RecordPackageClassScanner classScanner, FieldLocator fieldLocator); @Override ObjectMapping find(Class domainClass); void setPackages(List<String> packages); }
AnnotatedObjectMappingStore extends ObjectMappingStore { @Override public ObjectMapping find(Class domainClass) { if (getObjectMappingCount() == 0) { initializeObjectMappings(); } return super.find(domainClass); } AnnotatedObjectMappingStore(); protected  AnnotatedObjectMappingStore(RecordPackageClassScanner classScanner, FieldLocator fieldLocator); @Override ObjectMapping find(Class domainClass); void setPackages(List<String> packages);  }