public void testReadingConfigurationsDoesNotLeakAugeasReferences(final String installDir, final String exePath,
int configurationReadingInvocationCount) throws Exception {
final FakeServerInventory fakeInventory = new FakeServerInventory();
PluginContainerTest.getCurrentMockContext().checking(new Expectations() {
{
ServerServices ss = PluginContainerTest.getCurrentPluginContainerConfiguration().getServerServices();
allowing(ss.getDiscoveryServerService()).mergeInventoryReport(with(any(InventoryReport.class)));
will(fakeInventory.mergeInventoryReport(InventoryStatus.COMMITTED));
allowing(ss.getDiscoveryServerService()).getResources(with(any(Set.class)), with(any(boolean.class)));
will(fakeInventory.getResources());
allowing(ss.getDiscoveryServerService()).mergeAvailabilityReport(with(any(AvailabilityReport.class)));
allowing(ss.getDiscoveryServerService()).postProcessNewlyCommittedResources(with(any(Set.class)));
allowing(ss.getDiscoveryServerService()).setResourceEnablement(with(any(int.class)),
with(any(boolean.class)));
ignoring(ss.getBundleServerService());
ignoring(ss.getConfigurationServerService());
ignoring(ss.getContentServerService());
ignoring(ss.getCoreServerService());
ignoring(ss.getEventServerService());
ignoring(ss.getMeasurementServerService());
ignoring(ss.getOperationServerService());
ignoring(ss.getResourceFactoryServerService());
}
});
boolean apacheStarted = false;
try {