@Autowired
private List<ModelConverter> originalConverters;
@Before
public void setup() throws NoSuchFieldException, IllegalAccessException {
ModelConverter personConverter = createMock(ModelConverter.class);
expect(personConverter.getSourceType()).andReturn(Person.class).anyTimes();
expect(personConverter.convert(isA(PersonImpl.class))).andReturn(new JpaPerson());
replay(personConverter);
ModelConverter addressConverter = createMock(ModelConverter.class);
expect(addressConverter.getSourceType()).andReturn(Address.class).anyTimes();
expect(addressConverter.convert(isA(AddressImpl.class))).andReturn(new JpaAddress());
replay(addressConverter);
ModelConverter pageLayoutConverter = createMock(ModelConverter.class);
expect(pageLayoutConverter.getSourceType()).andReturn(Address.class).anyTimes();
expect(pageLayoutConverter.convert(isA(PageLayout.class))).andReturn(new JpaPageLayout());
replay(pageLayoutConverter);
List<ModelConverter> converters = new ArrayList<ModelConverter>();
converters.add(personConverter);
converters.add(addressConverter);