Haiku { public List<Line> asLines() { String[] split = linesPattern.split(haiku); List<String> strings = Arrays.asList(split); if (!isValidLineCount()) throw new RuntimeException("A haiku yoyo, it should be 3 lines only, try again carrot"); List<Line> lines = new ArrayList<Line>(); for (String s : strings) { lines.add(new Line(s)); } return lines; } Haiku(String haiku); List<Line> asLines();  }
@Test public void test_that_it_breaks_up_into_3_lines() { Haiku haiku = new Haiku(INPUT_ONE); List<Haiku.Line> lines = haiku.asLines(); assertThat(lines.size()).isEqualTo(3); }