SeparatorsValidator { public boolean validate(String input) { int separatorsCounter = 0; for (int i = 0; i < input.length(); i++) { if (input.charAt(i) == HAIKU_SEPARATOR) { separatorsCounter++; } } return separatorsCounter == SEPARATORS_COUNT; }  boolean validate(String input);  }
@Test public void testInputWithTwoSlashesIsValid() throws Exception { String input = " boolean result = validator.validate(input); assertTrue(result); }
@Test public void testInputWithOneSlashIsNotValid() throws Exception { String input = "/"; boolean result = validator.validate(input); assertFalse(result); }
@Test public void testInputWithThreeSlashesIsNotValid() throws Exception { String input = " boolean result = validator.validate(input); assertFalse(result); }