### Question:
BaseProperty implements PropertyDescriptor { public String getName() { return name; } BaseProperty(ClassDescriptor owner, Accessor accessor); Object readProperty(Object object); void writeProperty(Object object, Object oldValue, Object newValue); String getName(); abstract boolean visit(PropertyVisitor visitor); void injectValueHolder(Object object); Object readPropertyDirectly(Object object); void writePropertyDirectly(Object object, Object oldValue, Object newValue); @Override String toString();  }### Answer:
@Test public void testGetName() { ClassDescriptor owner = mock(ClassDescriptor.class); Accessor accessor = mock(Accessor.class); when(accessor.getName()).thenReturn("xyz"); BaseProperty p = new BaseProperty(owner, accessor) { @Override public boolean visit(PropertyVisitor visitor) { return true; } }; assertEquals("xyz", p.getName()); }