@Test
public void getModule() throws IOException{

    String moduleName = "module";
    String moduleVersion = "1.0.0-SNAPSHOT";
    Module module1 = DataModelFactory.createModule(moduleName, moduleVersion);
    Artifact artifact1 = DataModelFactory.createArtifact("com.axway.test", "artifact1", "1.0.0-SNAPSHOT", "win32", "jar", "");
    Artifact artifact2 = DataModelFactory.createArtifact("com.axway.test", "artifact2", "1.0.0-SNAPSHOT", "win32", "jar", "");
    Artifact dependency = DataModelFactory.createArtifact("com.axway.test", "dependency", "1.0.0-SNAPSHOT", "win32", "jar", "");
    module1.addDependency(DataModelFactory.createDependency(artifact2,Scope.COMPILE));
    module1.addDependency(DataModelFactory.createDependency(dependency, Scope.TEST));
    module1.addArtifact(artifact1);
    module1.addArtifact(artifact2);
    stubFor(get(urlEqualTo("/" + ServerAPI.MODULE_RESOURCE + "/" + moduleName + "/" + moduleVersion))
            .willReturn(aResponse()
                    .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
                    .withBody(JsonUtils.serialize(module1))
                    .withStatus(Status.OK.getStatusCode())));
    Exception exception = null;
    Module module2= null;
    try{
        module2 = client.getModule(moduleName, moduleVersion);
    }catch (Exception e) {
        exception = e;
    }
    assertNull(exception);
    assertNotNull(module2);
    assertEquals(module1, module2);
}