@Test public void checkGetPropertyKey() { Field annotation = mock(Field.class); when(annotation.value()).thenReturn("foo"); VariableElement element = mock(VariableElement.class); when(element.getAnnotation(Matchers.<Class<Field>>anyObject())).thenReturn(annotation); FieldModel model = new FieldModel(element, null); ASSERT.that("foo").isEqualTo(model.getPropertyKey()); }
public String getPropertyKey() { return element.getAnnotation(Field.class).value(); }
FieldModel { public String getPropertyKey() { return element.getAnnotation(Field.class).value(); } }
FieldModel { public String getPropertyKey() { return element.getAnnotation(Field.class).value(); } FieldModel(VariableElement element, EntityModel dependency); }
FieldModel { public String getPropertyKey() { return element.getAnnotation(Field.class).value(); } FieldModel(VariableElement element, EntityModel dependency); static FieldKind getKind(Helper helper, VariableElement element); VariableElement getElement(); String getName(); TypeModel getType(); String getPropertyKey(); EntityModel getDependency(); @Override boolean equals(Object o); @Override int hashCode(); FieldKind getKind(Helper helper); }
FieldModel { public String getPropertyKey() { return element.getAnnotation(Field.class).value(); } FieldModel(VariableElement element, EntityModel dependency); static FieldKind getKind(Helper helper, VariableElement element); VariableElement getElement(); String getName(); TypeModel getType(); String getPropertyKey(); EntityModel getDependency(); @Override boolean equals(Object o); @Override int hashCode(); FieldKind getKind(Helper helper);  }