### Question:
AdvancedCashValidator extends InputValidator { @Override public ValidationResult validate(String input) { ValidationResult result = super.validate(input); if (!result.isValid) return result; result = emailValidator.validate(input); if (!result.isValid) result = regexValidator.validate(input); return result; } @Inject  AdvancedCashValidator(EmailValidator emailValidator, RegexValidator regexValidator); @Override ValidationResult validate(String input);  }### Answer:
@Test public void validate(){ AdvancedCashValidator validator = new AdvancedCashValidator( new EmailValidator(), new RegexValidator() ); assertTrue(validator.validate("U123456789012").isValid); assertTrue(validator.validate("test@user.com").isValid); assertFalse(validator.validate("").isValid); assertFalse(validator.validate(null).isValid); assertFalse(validator.validate("123456789012").isValid); }