How do you test, or do you test at all, classes that convert some other data model/structure into your data model?
interface ToTradeObjectConverter<T> {
public Trade convertToTrade (T source);
}
public class Trade {
// here we have ~ 100 fields, like dates, account, currencies, etc.
}
The converter just populates Trade
through setters, getting data from another object or parsing a text or XML or whatever.
Would you test such a class? If so, what is a good approach? I don't want to mock (EasyMock) arguments and add 100 lines of "easy mock expect proper getter and setter invoked".