Mock mockContainer = new Mock(Container.class);
mockConfiguration.expectAndReturn("getContainer", mockContainer.proxy());
mockContainer.expectAndReturn("getInstance", C.args(C.eq(ObjectFactory.class)), destroyedObjectFactory);
mockConfiguration.expectAndReturn("getContainer", mockContainer.proxy());
mockConfiguration.expectAndReturn("getContainer", mockContainer.proxy());
FileManager fileManager = new DefaultFileManager();
mockContainer.expectAndReturn("getInstance", C.args(C.eq(FileManager.class)), fileManager);
mockContainer.expectAndReturn("getInstance", C.args(C.eq(FileManager.class)), fileManager);
mockConfiguration.expect("destroy");
mockConfiguration.matchAndReturn("getPackageConfigs", new HashMap<String, PackageConfig>());