Validators { public static ValidationCallback booleanValidator() { return BOOLEAN_VALIDATOR; } private  Validators(); static ValidationCallback charsetValidator(); static ValidationCallback integerRangeValidator(int lowerBound, int upperBound); static ValidationCallback booleanValidator();  }
@Test public void booleanValidator() { ValidationCallback validator = Validators.booleanValidator(); assertThat(validator.validate("true")).isEmpty(); assertThat(validator.validate("false")).isEmpty(); assertThat(validator.validate("foo")).isEqualTo("Must be either \"true\" or \"false\": foo"); }
@Test public void booleanValidator_single_instance() { assertThat(Validators.booleanValidator()).isSameAs(Validators.booleanValidator()); }