@Test
public void testTypeConvertedAndNotConverted() throws Exception {

    String empName1 = "EmployeeA1";
    String empName2 = "EmployeeA2";
    List input = Arrays.asList(new Object[] {empName1, empName2});
    BagQueryResult res = runner.searchForBag("Manager", input, null, true);
    Assert.assertEquals(1, res.getMatches().values().size());
    Assert.assertEquals(empName1, ((List) res.getMatches().values().iterator().next()).get(0));
    Map issues = res.getIssues();
    Map converted = (Map) issues.get(BagQueryResult.TYPE_CONVERTED);
    Assert.assertEquals(1, converted.values().size());
    Map convertedInputToObjs = (Map) converted.values().iterator().next();
    Assert.assertEquals(1, convertedInputToObjs.size());
    Assert.assertEquals(empName2, convertedInputToObjs.keySet().iterator().next());
    List convertedPairs = (List) convertedInputToObjs.values().iterator().next();
    Assert.assertEquals(1, convertedPairs.size());
    ConvertedObjectPair pair = (ConvertedObjectPair) convertedPairs.get(0);
    Assert.assertEquals("org.intermine.model.testmodel.Manager", pair.getNewObject().getClass().getName());
    Assert.assertEquals("EmployeeA2", ((Employee) pair.getOldObject()).getName());
    Assert.assertEquals("EmployeeA1", ((Manager) pair.getNewObject()).getName());
    Map resUnresolved = res.getUnresolved();
    Assert.assertTrue(resUnresolved.size() == 0);
}