@Test public void checkGetMapProperty() { Entity annotation = mock(Entity.class); when(annotation.value()).thenReturn("foo"); TypeElement element = mock(TypeElement.class); when(element.getAnnotation(Matchers.<Class<Entity>>anyObject())).thenReturn(annotation); EntityModel entity = new EntityModel(element); ASSERT.that("foo").isEqualTo(entity.getAnnotationValue()); }
public String getAnnotationValue() { return element.getAnnotation(Entity.class).value(); }
EntityModel implements EntityData { public String getAnnotationValue() { return element.getAnnotation(Entity.class).value(); } }
EntityModel implements EntityData { public String getAnnotationValue() { return element.getAnnotation(Entity.class).value(); } EntityModel(TypeElement element); }
EntityModel implements EntityData { public String getAnnotationValue() { return element.getAnnotation(Entity.class).value(); } EntityModel(TypeElement element); void fillFieldsList(Helper helper, List<EntityModel> models); Element getElement(); @Override String getName(); @Override String getFullQualifiedName(); @Override String getPackage(); @Override String getVariable(); MapperModel getMapper(); boolean hasAnnotationValue(); String getAnnotationValue(); List<FieldModel> getFields(); List<EntityModel> getDependencies(); }
EntityModel implements EntityData { public String getAnnotationValue() { return element.getAnnotation(Entity.class).value(); } EntityModel(TypeElement element); void fillFieldsList(Helper helper, List<EntityModel> models); Element getElement(); @Override String getName(); @Override String getFullQualifiedName(); @Override String getPackage(); @Override String getVariable(); MapperModel getMapper(); boolean hasAnnotationValue(); String getAnnotationValue(); List<FieldModel> getFields(); List<EntityModel> getDependencies();  }