@Test
void viewWithPrimaryKey() {

    assertThatThrownBy(() -> new DatabaseClassValidator(TestViewWithPrimaryKey.class).validateViewClass())
            .isInstanceOf(Error.class)
            .hasMessageContaining("db view field must not have @PrimaryKey");
}