@Test
public void getModuleAncestors() throws IOException {

    final List<Dependency> list = new ArrayList<Dependency>();
    final Dependency dependency = DataModelFactory.createDependency(DataModelFactory.createArtifact("", "ancestor", "", "", "", ""), Scope.COMPILE);
    list.add(dependency);
    final String moduleName = "module";
    final String moduleVersion = "1.0.0-SNAPSHOT";
    stubFor(get(urlMatching("/" + ServerAPI.MODULE_RESOURCE + "/" + moduleName + "/" + moduleVersion + ServerAPI.GET_ANCESTORS + "?.*"))
            .willReturn(aResponse()
                    .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
                    .withBody(JsonUtils.serialize(list))
                    .withStatus(Status.OK.getStatusCode())));
    Exception exception = null;
    List<Dependency> list2 = null;
    try{
        list2 = client.getModuleAncestors(moduleName, moduleVersion);
    }catch (Exception e) {
        exception = e;
    }
    assertNull(exception);
    assertNotNull(list2);
}