assertEquals(composite.getComponents().get(0).getConstrainingType(), constrainingType);
}
public void testResolveComposite() throws Exception {
InputStream is = getClass().getResourceAsStream("Calculator.composite");
CompositeProcessor compositeReader = new CompositeProcessor(new DefaultContributionFactory(), factory, policyFactory, staxProcessor);
XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
Composite nestedComposite = compositeReader.read(reader);
is.close();
assertNotNull(nestedComposite);
resolver.addModel(nestedComposite);
is = getClass().getResourceAsStream("TestAllCalculator.composite");
compositeReader = new CompositeProcessor(new DefaultContributionFactory(), factory, policyFactory, staxProcessor);
reader = inputFactory.createXMLStreamReader(is);
Composite composite = compositeReader.read(reader);
is.close();
compositeReader.resolve(composite, resolver);