@Test
public void should_get_cp_case_form() throws IOException {

    CaseForm caseForm = new CaseForm();
    caseForm.setForm(new Blob(formForm.getBytes()));
    when(caseFormDao.getCaseForm(anyString(), anyString())).thenReturn(caseForm);
    CaseTemplateForm form = caseFormService.getCPTemplate();
    assertThat(form.getSections().size(), is(1));
    Section section = form.getSections().get(0);
    assertThat(section.getName().get("en"), is("Basic Identity"));
    assertThat(section.getOrder(), is(10));
    assertThat(section.getHelpText().get("en"), is(""));
    assertThat(section.getBaseLanguage(), is("en"));
    Field field = section.getFields().get(0);
    assertThat(field.getName(), is("case_id"));
    assertThat(field.getDisplayName().get("en"), is("Long ID"));
    assertThat(field.getHelpText().get("en"), is(""));
    assertThat(field.getType(), is("text_field"));
    assertThat(field.getOptionStringsText().get("en").size(), is(0));
    assertThat(field.getSubForm(), is(nullValue()));
}