MappedEntity { public boolean isLifecycle() { return this.lifecycle != null && this.lifecycle.value(); } MappedEntity(T transformer, Class<?> clazz); T getTransformer(); boolean isLifecycle(); boolean isPolymorphic(); Map<String, F> getFields(); Field getIdField(); void map(); void call(LifecycleAction action, Object entity); void set(LifecycleAction action, Object entity, Object value);  }
@Test void isLifecycle() { TestTransformer transformer = new TestTransformer(); TestMappedEntity entity = new TestMappedEntity(transformer, StandardEntity.class); assertFalse(entity.isLifecycle()); entity = new TestMappedEntity(transformer, LifecycleEntity.class); assertTrue(entity.isLifecycle()); }