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]);