@Test
void validate() {

    validator.usedProperties.add("app.usedKey");
    assertThatThrownBy(() -> validator.validate(Set.of("app.usedKey", "app.notUsedKey")))
            .isInstanceOf(Error.class)
            .hasMessageContaining("found not used properties")
            .hasMessageContaining("keys=[app.notUsedKey]");
}