BeanListenerAspect { private FieldSpecification<?, ?> getFieldSpecification(Object entity, String fieldName, UnitOfWorkImpl persistenceContext) { final EntityType<?> et = persistenceContext.getMetamodel().entity(entity.getClass()); assert et != null; return et.getFieldSpecification(fieldName); }  @DeclareMixin(value = "!is(InterfaceType) && (@cz.cvut.kbss.jopa.model.annotations.OWLClass *)") static Manageable createImpl(); void register(Object instance, UnitOfWorkImpl persistenceContext); void deregister(Object instance); @AfterReturning("setter()") void afterSetter(JoinPoint thisJoinPoint); @Before("getter()") void beforeGetter(JoinPoint thisJoinPoint);  }
@Test void getterAspectIsCalledForFieldsInMappedSuperclass() throws Exception { final OWLClassQ entityQ = new OWLClassQ(); entityQ.setUri(Generators.createIndividualIdentifier()); final FieldSpecification aSpec = metamodelMock.entity(OWLClassQ.class).getFieldSpecification("owlClassA"); when(aSpec.getFetchType()).thenReturn(FetchType.LAZY); final OWLClassQ clone = (OWLClassQ) sut.registerExistingObject(entityQ, descriptor); clone.getOwlClassA(); verify(sut).loadEntityField(clone, OWLClassQ.getOwlClassAField()); }