@Test
public void testDefaultConfiguration() throws Exception
{
startViewRequest("/index.xhtml");
RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(externalContext);
Set<String> allContracts = runtimeConfig.getResourceLibraryContracts();
Set<String> externalContextContracts = runtimeConfig.getExternalContextResourceLibraryContracts();
Set<String> classloaderContracts = runtimeConfig.getClassLoaderResourceLibraryContracts();
Assert.assertTrue(allContracts.contains("yellow"));
Assert.assertTrue(allContracts.contains("blue"));
Assert.assertTrue(allContracts.contains("red"));
Assert.assertTrue(classloaderContracts.contains("yellow"));
Assert.assertTrue(classloaderContracts.contains("blue"));
Assert.assertTrue(externalContextContracts.contains("red"));
List<String> defaultContracts = runtimeConfig.getContractMappings().get("*");
Assert.assertFalse(defaultContracts.contains("yellow"));
Assert.assertTrue(defaultContracts.contains("blue"));
Assert.assertFalse(defaultContracts.contains("red"));