@Test
public void testGetConversionQuery() throws Exception {

    List<String> classKeys = new ArrayList<String>();
    classKeys.add("name");
    InterMineBag bag = new InterMineBag("Fred", "Employee", "Test bag", new Date(),
                                        BagState.CURRENT, os, null, uosw, classKeys);
    PathQuery resQuery = TypeConverter.getConversionQuery(conversionTemplates, Employee.class, Address.class, bag);
    Assert.assertEquals(1, resQuery.getConstraints().size());
    PathConstraintBag resCon = (PathConstraintBag) resQuery.getConstraints().keySet().iterator().next();
    Assert.assertNotNull(resCon);
    Assert.assertEquals("Employee", resCon.getPath());
    Assert.assertEquals(ConstraintOp.IN, resCon.getOp());
    Assert.assertEquals(bag.getName(), resCon.getBag());
    List<String> expectedView = new ArrayList<String>(Collections.singleton("Employee.address.id"));
    Assert.assertEquals(expectedView, resQuery.getView());
}