### Question:
ValidatorSet { public void addValidator(@NonNull AbstractValidator validator) { createValidatorsListIfNotExists(validator); addValidatorToMap(validator); addTextChangeListener(validator.autoDismiss, validator.editText); } ValidatorSet(); void addValidator(@NonNull AbstractValidator validator); void addValidators(@NonNull List<AbstractValidator> validators); boolean isValid(); void clearValidators(); final ValidationErrorSet errors; }### Answer:
@Test public void addOneValidator() { validatorSet.addValidator(new RequiredValidator(mockEditText, errorMessage, true)); assertEquals(validatorSet.map.size(), 1); }
@Test public void addTwoValidators() { validatorSet.addValidator(new RequiredValidator(mockEditText, errorMessage, true)); validatorSet.addValidator(new EmailValidator(mockEditText_2, errorMessage, true, true)); assertEquals(validatorSet.map.size(), 2); }
@Test public void addThreeValidators() { validatorSet.addValidator(new RequiredValidator(mockEditText, errorMessage, true)); validatorSet.addValidator(new EmailValidator(mockEditText_2, errorMessage, true, true)); validatorSet.addValidator(new LengthValidator(mockEditText_3,errorMessage, 0, 5, true, true)); assertEquals(validatorSet.map.size(), 3); }