assertFalse(lockedDomainService.gadgetCanRender("www.example.com", wantsLocked, "default"));
assertTrue(lockedDomainService.gadgetCanRender("www.example.com", notLocked, "default"));
}
public void testMultiContainer() throws Exception {
ContainerConfig inheritsConfig = mock(ContainerConfig.class);
expect(inheritsConfig.getContainers())
.andReturn(Arrays.asList(ContainerConfig.DEFAULT_CONTAINER, "other"));
expect(inheritsConfig.get(isA(String.class), eq(LOCKED_DOMAIN_REQUIRED_KEY)))
.andReturn("true").anyTimes();
expect(inheritsConfig.get(isA(String.class), eq(LOCKED_DOMAIN_SUFFIX_KEY)))
.andReturn("-a.example.com:8080").anyTimes();
replay();
lockedDomainService = new HashLockedDomainService(inheritsConfig, true);
assertFalse(lockedDomainService.gadgetCanRender("www.example.com", wantsLocked, "other"));