EasyMock.expect(component.getParent()).andReturn(composite).once();
EasyMock.expect(outboundWire.getContainer()).andReturn(component);
EasyMock.replay(outboundWire, inboundWire, composite, component);
interceptor = new DataBindingInteceptor(outboundWire, operation1, inboundWire, operation2);
Mediator mediator = createMock(Mediator.class);
Object[] source = new Object[] {"<foo>bar</foo>"};
Foo foo = new Foo();
foo.bar = "bar";
Object[] target = new Object[] {foo};
expect(mediator.mediate(EasyMock.same(source),
EasyMock.same(inputType1),
EasyMock.same(inputType2),
EasyMock.isA(Map.class))).andReturn(target);
// expect(mediator.mediate(target[0], type2,
// type1)).andReturn(source[0]);
expect(mediator.mediate(EasyMock.same(target[0]),
EasyMock.eq(outputType2),
EasyMock.eq(outputType1),
EasyMock.isA(Map.class))).andReturn(source[0]);
replay(mediator);
interceptor.setMediator(mediator);