@Test
public void should_load_case_form_when_give_cookie_and_module_id() throws Exception {

    CaseTemplateForm caseTemplateForm = createCaseTemplateForm();
    Observable<CaseTemplateForm> observable = Observable.just(caseTemplateForm);
    when(formRemoteService.getCaseForm("cookie", "en", true, "case", PrimeroAppConfiguration.MODULE_ID_CP))
            .thenReturn(observable);
    when(PrimeroAppConfiguration.getCookie()).thenReturn("cookie");
    when(PrimeroAppConfiguration.getDefaultLanguage()).thenReturn("en");
    AppRemoteService.LoadCallback callback = mock(AppRemoteService.LoadCallback.class);
    appRemotePresenter.loadCaseForm(PrimeroAppConfiguration.MODULE_ID_CP, callback);
    verify(caseFormService, times(1)).saveOrUpdate(any(CaseForm.class));
    verify(callback, times(1)).onSuccess();
    verify(callback, never()).onFailure();
}