@Test
public void getAllModuleNames() throws UnknownHostException {

    when(repositoryHandler.getModuleNames((FiltersHolder) anyObject())).thenReturn(Lists.newArrayList("module1"));
    final WebResource resource = client().resource("/" + ServerAPI.MODULE_RESOURCE + ServerAPI.GET_NAMES);
    final ClientResponse response = resource.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class);
    assertNotNull(response);
    assertEquals(HttpStatus.OK_200, response.getStatus());
    final List<String> results = response.getEntity(new GenericType<List<String>>() {
    });
    assertNotNull(results);
    assertEquals(1, results.size());
    assertEquals("module1", results.get(0));
}