MappedEntity { public void map() { if (this.lifecycleMethods != null) { this.lifecycleMethods.clear(); LifecycleAction.populateMethods(clazz, this.lifecycleMethods); } if (this.lifecycleFields != null) { this.lifecycleFields.clear(); LifecycleAction.populateFields(clazz, this.lifecycleFields); } List<Field> allFields = Search.getAllFields(this.clazz, new EntitySearchCriteria()); for (Field field : allFields) { if (Modifier.isStatic(field.getModifiers())) { continue; } insert(field); } } 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 map() { TestTransformer transformer = new TestTransformer(); TestMappedEntity entity = new TestMappedEntity(transformer, StandardEntity.class); entity.map(); entity = new TestMappedEntity(transformer, LifecycleEntity.class); entity.map(); }