@Test
void validate() {

    assertThatThrownBy(() -> validator.validate(null, false))
            .isInstanceOf(ValidationException.class)
            .hasMessageContaining("bean must not be null");
    assertThatThrownBy(() -> validator.validate(new TestBean(), false))
            .isInstanceOf(ValidationException.class)
            .hasMessageContaining("value=field must not be null");
}