public static void validateString(String val, String errorMessage) {
        if (val == null || val.isEmpty()) {
            throw new IncorrectParameterException(errorMessage);
        }
    }
@Test
    void validateStringTest() {
        Validator.validateString("Hello", s -> "Incorrect string " + s);
        Validator.validateString(" ", s -> "Incorrect string " + s);
        Validator.validateString("\n", s -> "Incorrect string " + s);

        assertThatThrownBy(() -> Validator.validateString(null, s -> "Incorrect string " + s))
                .as("String is null")
                .isInstanceOf(IncorrectParameterException.class)
                .hasMessageContaining("Incorrect string null");

        assertThatThrownBy(() -> Validator.validateString("", s -> "Incorrect string " + s))
                .as("String is empty")
                .isInstanceOf(IncorrectParameterException.class)
                .hasMessage("Incorrect string ");

        assertThatThrownBy(() -> Validator.validateString("", s -> "Incorrect string [" + s + "]"))
                .as("String is empty []")
                .isInstanceOf(IncorrectParameterException.class)
                .hasMessage("Incorrect string []");
    }