private ResourceContainer getResourceContainer() throws Exception {
Resource resource = new Resource("TestPlatformKey", "MyTestPlatform", PluginMetadataManager.TEST_PLATFORM_TYPE);
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
ResourceContainer resourceContainer = new ResourceContainer(resource, contextClassLoader);
ResourceContext resourceContext = new ResourceContext(resource, null, null, null, null, null, null, null, null,
null, null, null, null, null, new ComponentInvocationContextImpl());
resourceContainer.setResourceContext(resourceContext);
ResourceComponent resourceComponent = new MockResourceComponent(false);
resourceContainer.setResourceComponent(resourceComponent);
resourceComponent.start(resourceContext);
return resourceContainer;