@Test
public void resolvesTypeWithTwoMatchingTransformer() throws ResolverException, TransformerException
{
MuleRegistry muleRegistry = mock(MuleRegistry.class);
when(muleContext.getRegistry()).thenReturn(muleRegistry);
Transformer aToBConverter = new MockConverterBuilder().from(dataTypeA).to(dataTypeB).weighting(1).build();
Transformer betterAToBConverter = new MockConverterBuilder().from(dataTypeA).to(dataTypeB).weighting(2).build();
ArrayList<Transformer> transformers = new ArrayList<Transformer>();
transformers.add(aToBConverter);
transformers.add(betterAToBConverter);
when(muleRegistry.lookupTransformers(dataTypeA, dataTypeB)).thenReturn(transformers);