@Test
public void should_get_CP_search_result() throws Exception {

    List<Long> list = new ArrayList<>();
    Map<String, String> searchCondition = mock(Map.class);
    User user = new User();
    user.setRole(User.ROLE_CP);
    when(PrimeroAppConfiguration.getCurrentUser()).thenReturn(user);
    when(searchCondition.get(anyString())).thenReturn("0");
    when(caseService.getCPSearchResult(anyString(),anyString(),anyInt(),anyInt(),anyString(),any()))
            .thenReturn(list);
    assertThat("Should return CP search list", caseSearchPresenter.getSearchResult(searchCondition),
            is(list));
    verify(caseService, times(1)).
            getCPSearchResult(anyString(), anyString(),anyInt(),anyInt(),anyString(),any());
}