@Test
public void testGetHostServices() {

    
    SignedDomain signedDomain = createSignedDomain("coretech", "weather", "storage", true);
    store.processDomain(signedDomain, false);
    
    SimplePrincipal principal = (SimplePrincipal) SimplePrincipal.create("hockey", "kings",
            "v=S1,d=hockey;n=kings;s=sig", 0, new PrincipalAuthority());
    ResourceContext context = createResourceContext(principal);
    
    HostServices hosts = zts.getHostServices(context, "host1");
    assertEquals(1, hosts.getNames().size());
    assertTrue(hosts.getNames().contains("coretech.storage"));
    
    hosts = zts.getHostServices(context, "host2");
    assertEquals(2, hosts.getNames().size());
    assertTrue(hosts.getNames().contains("coretech.storage"));
    assertTrue(hosts.getNames().contains("coretech.backup"));
    
    hosts = zts.getHostServices(context, "host3");
    assertEquals(1, hosts.getNames().size());
    assertTrue(hosts.getNames().contains("coretech.backup"));
}