@Test
void withInvalidPrimaryKeyType() {

    assertThatThrownBy(() -> new DatabaseClassValidator(TestEntityWithInvalidPrimaryKey.class).validateEntityClass())
            .isInstanceOf(Error.class)
            .hasMessageContaining("primary key must be Integer or Long");
}