### Question:
DefaultRpcServiceLookup implements RpcServiceLookup { void setServicesFor(String container, Multimap<String, String> foundServices) { containerServices.asMap().put(container, foundServices); } @Inject  DefaultRpcServiceLookup(ServiceFetcher fetcher,
      @Named("org.apache.shindig.serviceExpirationDurationMinutes")Long duration); Multimap<String, String> getServicesFor(final String container, final String host);  }### Answer:
@Test public void testGetServicesForContainer_OneContainerTwoServices() throws Exception { Set<String> expectedServiceMethods = Sets.newHashSet("system.listMethods", "people.get", "people.update", "people.create", "people.delete"); LinkedHashMultimap<String, String> expectedServices = LinkedHashMultimap.create(); expectedServices.putAll(socialEndpoint, expectedServiceMethods); String container = "ig"; svcLookup.setServicesFor(container, expectedServices); assertServiceHasCorrectConfig(socialEndpoint, expectedServiceMethods, container, 1); }
@Test public void testGetServiceForContainer_TwoContainersOneEndpoint() throws Exception { String socialEndpoint2 = "http: Set<String> expectedServiceMethods = Sets.newHashSet("system.listMethods", "people.get", "people.update", "people.create", "people.delete"); Set<String> expectedServiceMethods2 = Sets.newHashSet("cache.invalidate"); LinkedHashMultimap<String, String> expectedServices = LinkedHashMultimap.create(); expectedServices.putAll(socialEndpoint, expectedServiceMethods); LinkedHashMultimap<String, String> expectedServices2 = LinkedHashMultimap.create(); expectedServices2.putAll(socialEndpoint2, expectedServiceMethods2); String container = "ig"; String container2 = "gm"; svcLookup.setServicesFor(container, expectedServices); svcLookup.setServicesFor(container2, expectedServices2); assertServiceHasCorrectConfig(socialEndpoint, expectedServiceMethods, container, 1); assertServiceHasCorrectConfig(socialEndpoint2, expectedServiceMethods2, container2, 1); }