realFinder.addCapabilities(MULTI_MODEL, new AllCapabilities());
// Set up the multi source finder, which will dynamically override a few capabilities
List models = new ArrayList();
models.add(MULTI_MODEL);
MultiSourceCapabilitiesFinder finder = new MultiSourceCapabilitiesFinder(realFinder, models);
// Test the single model to show that it is not affected
SourceCapabilities singleCaps = finder.findCapabilities(SINGLE_MODEL);
assertEquals(true, singleCaps.supportsCapability(Capability.QUERY_UNION));
assertEquals(true, singleCaps.supportsCapability(Capability.QUERY_ORDERBY));
assertEquals(true, singleCaps.supportsCapability(Capability.QUERY_SELECT_DISTINCT));
assertEquals(true, singleCaps.supportsCapability(Capability.QUERY_AGGREGATES_AVG));
// Test the multi model to show that it IS affected
SourceCapabilities multiCaps = finder.findCapabilities(MULTI_MODEL);
assertEquals(false, multiCaps.supportsCapability(Capability.QUERY_UNION));
assertEquals(false, multiCaps.supportsCapability(Capability.QUERY_ORDERBY));
assertEquals(false, multiCaps.supportsCapability(Capability.QUERY_SELECT_DISTINCT));
assertEquals(false, multiCaps.supportsCapability(Capability.QUERY_AGGREGATES_AVG));