@Test
void call() {

    TestTransformer transformer = new TestTransformer();
    TestMappedEntity entity = new TestMappedEntity(transformer, LifecycleTest.class);
    entity.map();
    LifecycleTest test = new LifecycleTest();
    entity.call(LifecycleAction.BEFORE_CREATE, test);
    assertTrue(test.beforeCreate);
    entity.call(LifecycleAction.AFTER_CREATE, test);
    assertTrue(test.afterCreate);
    assertThrows(IllegalArgumentException.class, () -> entity.call(LifecycleAction.CREATED_AT, test));
    assertThrows(IllegalArgumentException.class, () -> entity.call(null, test));
    assertThrows(IllegalArgumentException.class, () -> entity.call(LifecycleAction.CREATED_AT, null));
    LocalDateTime time = LocalDateTime.now();
    assertNull(test.createdAt);
    entity.set(LifecycleAction.CREATED_AT, test, time);
    assertEquals(time, test.createdAt);
    assertNull(test.accessedAt);
    entity.set(LifecycleAction.ACCESSED_AT, test, time);
    assertEquals(time, test.accessedAt);
    assertNull(test.updatedAt);
    entity.set(LifecycleAction.UPDATED_AT, test, time);
    assertEquals(time, test.updatedAt);
    assertThrows(IllegalArgumentException.class, () -> entity.set(LifecycleAction.BEFORE_CREATE, test, time));
    assertThrows(IllegalArgumentException.class, () -> entity.set(null, test, time));
    assertThrows(IllegalArgumentException.class, () -> entity.set(LifecycleAction.BEFORE_CREATE, null, time));
    InvalidLifecycleTest invalidTest = new InvalidLifecycleTest();
    TestMappedEntity invalidEntity = new TestMappedEntity(transformer, InvalidLifecycleTest.class);
    invalidEntity.map();
    assertNull(invalidTest.createdAt);
    // assertThrows(MorphixFieldException.class, () -> entity.set(LifecycleAction.CREATED_AT, test, time));
    invalidEntity.set(LifecycleAction.CREATED_AT, invalidTest, time);
    System.out.println(invalidTest.createdAt);
}