e.compositeIdForeignA = a;
e.compositeIdForeignB = b;
e.save();
// let's get its key
Object id = factory.keyValue(e);
assertNotNull(id);
assertTrue(id instanceof CompositeIdPk);
CompositeIdPk pk = (CompositeIdPk) id;
assertEquals(a.id, pk.getCompositeIdForeignA());
assertEquals(b.id, pk.getCompositeIdForeignB());