DataContext context = (DataContext) this.context;
DataDomain domain = context.getParentDataDomain();
// setup mockup PK generator that will blow on PK request
// to emulate an exception
PkGenerator newGenerator = new JdbcPkGenerator(new JdbcAdapter()) {
@Override
public Object generatePk(DataNode node, DbAttribute pk) throws Exception {
throw new CayenneRuntimeException("Intentional");
}