@Test
public void testGetHostServices() {


    Principal principal = SimplePrincipal.create("user_domain", "user",
            "auth_creds", PRINCIPAL_AUTHORITY);

    ZTSRDLClientMock ztsClientMock = new ZTSRDLClientMock();
    ZTSClient client = new ZTSClient("http://localhost:4080", principal);
    ZTSClient.cancelPrefetch();
    client.setZTSRDLGeneratedClient(ztsClientMock);

    HostServices hostServices = client.getHostServices("host.exist");

    assertEquals(hostServices.getHost(), "host.exist");
    assertEquals(hostServices.getNames().size(), 2);

    try {
        client.getHostServices("not.exist.host");
        fail();
    } catch (ZTSClientException ex) {
        assertEquals(ex.getCode(), 404);
    }

    client.close();
}