@Test
public void itShouldThrowWhenEventIsNull() {

    RunHibernateEntity entity = buildUnsavedRun();
    entity.setEvent(null);
    try {
        daoTestRule.inTransaction(() -> dao.create(entity));
        failBecauseExceptionWasNotThrown(PersistenceException.class);
    } catch (Exception e) {
        assertThat(e)
                .isInstanceOf(PersistenceException.class)
                .hasCauseInstanceOf(ConstraintViolationException.class);
    }
}