assertEquals(new Header("1stLevelTestHeader", "testValue1"), headerManager.get(0));
assertEquals(new Header("2ndLevelTestHeader", "testValue2"), headerManager2.get(0));
}
public void testRecovery() throws Exception {
ConfigTestElement config = new ConfigTestElement();
config.addProperty(new StringProperty("name", "config"));
config.setRunningVersion(true);
LoginConfig loginConfig = new LoginConfig();
loginConfig.setUsername("user1");
loginConfig.setPassword("pass1");
assertTrue(config.getProperty("login") instanceof NullProperty);
// This test should work whether or not all Nulls are equal
assertEquals(new NullProperty("login"), config.getProperty("login"));
config.addProperty(new TestElementProperty("login", loginConfig));
assertEquals(loginConfig.toString(), config.getPropertyAsString("login"));
config.recoverRunningVersion();
assertTrue(config.getProperty("login") instanceof NullProperty);
assertEquals(new NullProperty("login"), config.getProperty("login"));
}