@Test
public void getModulesSearchResult() {

    DbSearch search = new DbSearch();
    List<String> moduleIds  = new ArrayList<>();
    moduleIds.add("testSearch_id_1");
    moduleIds.add("testSearch_id_2");
    search.setModules(moduleIds);
    when(repositoryHandler.getSearchResult(eq("testSearch"), (FiltersHolder) anyObject())).thenReturn(search);
    final WebResource resource = client().resource("/" + ServerAPI.SEARCH_RESOURCE + "/testSearch");
    final ClientResponse response = resource.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class);
    assertNotNull(response);
    assertEquals(HttpStatus.OK_200, response.getStatus());
    final String results = response.getEntity(new GenericType<String>() {
    });
    assertEquals("{\"modules\":[\"testSearch_id_1\",\"testSearch_id_2\"],\"artifacts\":null}", results);
}