HaikuReview { public int countWords(String input) { return new StringTokenizer(input, " /").countTokens(); }  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 testCorrectNumberOfWords() throws Exception { int wordCount = haikuReview.countWords("happy purple frog"); assertThat(wordCount).isEqualTo(3); }
@Test public void testCorrectNumberOfWordsForCompleteHaiku() throws Exception { int wordCount = haikuReview.countWords(VALID_INPUT_ONE); assertThat(wordCount).isEqualTo(10); }