@Test
public void testTranslation() throws Exception {

    ObjectStore os2
        = new ObjectStoreTranslatingImpl(
            Model.getInstanceByName("testmodel"),
            ObjectStoreFactory.getObjectStore("os.unittest"),
            new CompanyTranslator());
    Query q = new Query();
    QueryClass qc = new QueryClass(InterMineObject.class);
    q.addToSelect(qc);
    q.addFrom(qc);
    Results res = os2.execute(q);
    Assert.assertEquals(2, res.size());
    Assert.assertEquals("CompanyA", ((Bank) ((ResultsRow) res.get(0)).get(0)).getName());
    Assert.assertEquals("CompanyB", ((Bank) ((ResultsRow) res.get(1)).get(0)).getName());
}