### Question:
DataChannelProjectLoader implements ProjectLoader { public Project loadProject(Resource source) { ConfigurationTree<DataChannelDescriptor> tree = loader.load(source); return new Project(tree); }  Project loadProject(Resource source);  }### Answer:
@Test public void testLoad() { DataChannelProjectLoader loader = new DataChannelProjectLoader(); Module testModule = binder -> { binder.bind(ClassLoaderManager.class).to(DefaultClassLoaderManager.class); binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class); binder.bind(DataMapLoader.class).to(XMLDataMapLoader.class); binder.bind(DataChannelDescriptorLoader.class).to(XMLDataChannelDescriptorLoader.class); binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class); binder.bind(HandlerFactory.class).to(DefaultHandlerFactory.class); binder.bind(DataChannelMetaData.class).to(NoopDataChannelMetaData.class); binder.bind(XMLReader.class).toProviderInstance(new XMLReaderProvider(false)).withoutScope(); }; Injector injector = DIBootstrap.createInjector(testModule); injector.injectMembers(loader); String testConfigName = "PROJECT1"; String baseUrl = getClass().getPackage().getName().replace('.', '/'); URL url = getClass().getClassLoader().getResource(baseUrl + "/cayenne-" + testConfigName + ".xml"); Resource rootSource = new URLResource(url); Project project = loader.loadProject(rootSource); assertNotNull(project); DataChannelDescriptor rootNode = (DataChannelDescriptor) project.getRootNode(); assertNotNull(rootNode); assertSame(rootSource, rootNode.getConfigurationSource()); assertNotNull(project.getConfigurationResource()); assertEquals(project.getConfigurationResource(), rootSource); }