@Test
public void getModuleVersions() throws UnknownHostException {

    final String moduleName = "moduleTest";
    final String moduleVersion = "1.2.3-4";
    when(repositoryHandler.getModuleVersions(eq(moduleName), (FiltersHolder) anyObject())).thenReturn(Lists.newArrayList(moduleVersion));
    final WebResource resource = client().resource("/" + ServerAPI.MODULE_RESOURCE + "/" + moduleName + ServerAPI.GET_VERSIONS);
    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(moduleVersion, results.get(0));
}