@Test
public void getModules() throws IOException{

    String moduleName = "module";
    String moduleVersion = "1.0.0-SNAPSHOT";
    Module module1 = DataModelFactory.createModule(moduleName, moduleVersion);
    stubFor(get(urlEqualTo("/" + ServerAPI.MODULE_RESOURCE + ServerAPI.GET_ALL + "?test=test.test"))
            .willReturn(aResponse()
                    .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
                    .withBody(JsonUtils.serialize(Collections.singletonList(module1)))
                    .withStatus(Status.OK.getStatusCode())));
    Exception exception = null;
    List<Module> modules = null;
    try{
        modules = client.getModules(Collections.singletonMap("test", "test.test"));
    }catch (Exception e) {
        exception = e;
    }
    assertNull(exception);
    assertNotNull(modules);
    assertEquals(1, modules.size());
    assertEquals(module1, modules.get(0));
}