}
// Test needs to run in this package in order to give access to AbstractTestElement.addProperty()
public void DISABLEDtestBug50799() throws Exception {
HeaderManager headerManager = new HeaderManager();
headerManager.add(new Header("1stLevelTestHeader", "testValue1"));
HeaderManager headerManager2 = new HeaderManager();
headerManager2.add(new Header("2ndLevelTestHeader", "testValue2"));
DebugSampler debugSampler = new DebugSampler();
debugSampler.addProperty(new StringProperty("name", "DebugSampler_50799"));
debugSampler.setRunningVersion(true);
assertTrue(debugSampler.getProperty("HeaderManager.headers") instanceof NullProperty);
debugSampler.addTestElement(headerManager);
assertFalse(debugSampler.getProperty("HeaderManager.headers") instanceof NullProperty);
assertEquals(debugSampler.getProperty("HeaderManager.headers").getStringValue() ,"[1stLevelTestHeader testValue1]");
debugSampler.addTestElement(headerManager2);
assertEquals(debugSampler.getProperty("HeaderManager.headers").getStringValue() ,"[1stLevelTestHeader testValue1, 2ndLevelTestHeader testValue2]");
assertEquals(2, ((CollectionProperty)debugSampler.getProperty("HeaderManager.headers")).size());
headerManager.recoverRunningVersion();
headerManager2.recoverRunningVersion();
debugSampler.recoverRunningVersion();
assertEquals(1, headerManager.size());
assertEquals(1, headerManager2.size());
assertEquals(0, ((CollectionProperty)debugSampler.getProperty("HeaderManager.headers")).size());
assertEquals(new Header("1stLevelTestHeader", "testValue1"), headerManager.get(0));
assertEquals(new Header("2ndLevelTestHeader", "testValue2"), headerManager2.get(0));
}