@Test
void withNotNullAnnotationPrimaryKey() {

    assertThatThrownBy(() -> new DatabaseClassValidator(TestEntityWithNotNullAnnotationPK.class).validateEntityClass())
            .isInstanceOf(Error.class)
            .hasMessageContaining("db @PrimaryKey field must not have @NotNull");
}