Transformer t = registry.getTransformer("a", "b");
Assert.assertNull(t);
}
public void testGetTransformerChain() {
Transformer t1 = createMock(Transformer.class);
expect(t1.getSourceDataBinding()).andReturn("a");
expect(t1.getTargetDataBinding()).andReturn("b");
expect(t1.getWeight()).andReturn(10);
replay(t1);
Transformer t2 = createMock(Transformer.class);
expect(t2.getSourceDataBinding()).andReturn("b");
expect(t2.getTargetDataBinding()).andReturn("c");
expect(t2.getWeight()).andReturn(20);
replay(t2);
Transformer t3 = createMock(Transformer.class);
expect(t3.getSourceDataBinding()).andReturn("a");
expect(t3.getTargetDataBinding()).andReturn("c");
expect(t3.getWeight()).andReturn(120);
replay(t3);
registry.addTransformer(t1, true);
registry.addTransformer(t2, true);
registry.addTransformer(t3, true);