}
}
public void testUnencodedStringPk_BatchGet() throws EntityNotFoundException {
switchDatasource(PersistenceManagerFactoryName.nontransactional);
HasUnencodedStringPkJDO pojo = new HasUnencodedStringPkJDO();
beginTxn();
pojo.setId("yar1");
pm.makePersistent(pojo);
commitTxn();
HasUnencodedStringPkJDO pojo2 = new HasUnencodedStringPkJDO();
beginTxn();
pojo2.setId("yar2");
pm.makePersistent(pojo2);
commitTxn();
assertNotNull(pojo.getId());
assertNotNull(pojo2.getId());
beginTxn();
Query q = pm.newQuery("select from " + HasUnencodedStringPkJDO.class.getName() + " where id == :ids");
List<HasUnencodedStringPkJDO> pojos =
(List<HasUnencodedStringPkJDO>) q.execute(Utils.newArrayList(pojo.getId(), pojo2.getId()));
assertEquals(2, pojos.size());
// we should preserve order but right now we don't
Set<String> pks = Utils.newHashSet(pojos.get(0).getId(), pojos.get(1).getId());
assertEquals(pks, Utils.newHashSet("yar1", "yar2"));
commitTxn();