visitEnd(Foo6.class, type);
assertTrue(ModelHelper.matches(ModelHelper.getReference(type, "ref"), Ref.class));
}
public void testSingleConstructorAmbiguousRef() throws Exception {
JavaImplementation type = javaImplementationFactory.createJavaImplementation();
org.apache.tuscany.sca.assembly.Reference ref = ModelHelper.createReference(factory, javaFactory, "ref", Foo1.class);
type.getReferences().add(ref);
type.getReferenceMembers().put("ref", new JavaElementImpl("ref", Foo1.class, null));
org.apache.tuscany.sca.assembly.Reference ref2 = ModelHelper.createReference(factory, javaFactory, "ref2", Foo1.class);
type.getReferences().add(ref2);
type.getReferenceMembers().put("ref2", new JavaElementImpl("ref2", Foo1.class, null));
try {
visitEnd(Foo4.class, type);
fail();
} catch (AmbiguousConstructorException e) {
// expected