public String validate(String password) {
        return validators.stream()
                .map(validator -> validator.validate(password))
                .filter(Optional::isPresent).map(Optional::get)
                .reduce("", (partialString, element) -> (partialString.isEmpty() ? "" : partialString + ", ") + element);
    }
@Test
    public void testValidPassword() {
        String output = passwordValidator.validate("Password123$");
        Assert.assertTrue(output.isEmpty());
    }