@Test
void validateNotNull() {

    assertThatThrownBy(() -> new BeanValidatorBuilder(BeanWithDefaultValue.class).build())
            .isInstanceOf(Error.class)
            .hasMessageContaining("field with default value must have @NotNull");
}