assertEquals(UriStatus.VALID_VERSIONED, manager.validateRenderingUri(uri));
}
@Test
public void containerConfigurationChanges() throws Exception {
ContainerConfig config = new BasicContainerConfig();
config
.newTransaction()
.addContainer(ImmutableMap
.<String, Object>builder()
.put(ContainerConfig.CONTAINER_KEY, ContainerConfig.DEFAULT_CONTAINER)
.put(LOCKED_DOMAIN_SUFFIX_KEY, LD_SUFFIX)
.put(IFRAME_BASE_PATH_KEY, IFRAME_PATH)
.put(LOCKED_DOMAIN_REQUIRED_KEY, true)
.build())
.commit();
LockedDomainService ldService = new HashLockedDomainService(config, true, prefixGen);
TestDefaultIframeUriManager manager = new TestDefaultIframeUriManager(config, ldService);
Uri testUri = Uri.parse("http://foobar" + LD_SUFFIX + "/?url=http://example.com");
config.newTransaction().addContainer(ImmutableMap
.<String, Object>builder()
.put(ContainerConfig.CONTAINER_KEY, ContainerConfig.DEFAULT_CONTAINER)
.put(LOCKED_DOMAIN_SUFFIX_KEY, LD_SUFFIX_ALT)
.build()).commit();
assertEquals(UriStatus.VALID_UNVERSIONED, manager.validateRenderingUri(testUri));