### Question:
ContainedIntegerValidator implements Validator<String> { @Override public boolean isValid(String input) { try { return valid.contains(Integer.parseInt(input)); } catch (NumberFormatException e) { return false; } } ContainedIntegerValidator(Set<Integer> validValues); @Override boolean isValid(String input);  }### Answer:
@Test public void testNotContained() { assertFalse(victim.isValid("50")); }
@Test public void testInvalid() { assertFalse(victim.isValid("dsdsa")); }
@Test public void testValid() { assertTrue(victim.isValid("5")); }