HaikuReview { public boolean validateLineCount(String input) { Pattern pattern = Pattern.compile("[a-zA-Z ]+/[a-zA-Z ]+/[a-zA-Z ]+"); return pattern.matcher(input).matches(); }  boolean validateLineCount(String input); int countWords(String input); String[] asLines(String input); int countSyllables(String input); boolean isHaiku(String input); String review(String input); static final int FIRST_LINE_SYLLABLE_COUNT; static final int SECOND_LINE_SYLLABLE_COUNT; static final int THIRD_LINE_SYLLABLE_COUNT; static final String RESULT_VALID; static final String RESULT_SEPARATOR; static final String RESULT_NO; }
@Test public void testValidWhenHasThreeLines() throws Exception { boolean validated = haikuReview.validateLineCount(VALID_INPUT_ONE); assertThat(validated).isTrue(); }
@Test public void testNotValidWhenHasTwoLines() throws Exception { boolean validated = haikuReview.validateLineCount(INVALID_LINE_COUNT); assertThat(validated).isFalse(); }
@Test public void testInvalidWhenLessThenThreeWords() throws Exception { boolean validated = haikuReview.validateLineCount("a assertThat(validated).isFalse(); }
@Test public void testValidWhenHasThreeWords() throws Exception { boolean validated = haikuReview.validateLineCount("a/b/c"); assertThat(validated).isTrue(); }