CaseTemplateForm implements RecordForm { @Override public String toString() { StringBuilder sb = new StringBuilder("<Children>").append("\n"); for (Section section : sections) { sb.append(section).append("\n"); } return sb.toString(); }  List<Section> getSections(); void setSections(List<Section> sections); @Override String toString();  }
@Test public void should_return_string_of_case_template_form_when_section_is_empty() throws Exception { CaseTemplateForm caseTemplateForm = createCaseTemplateForm(); assertThat(caseTemplateForm.toString(), is("<Children>\n")); }