model.setInternalModelName("common/reference/1");
model.setModelAId("objectA/reference/1");
model.setModelBId("objectB/reference/1");
model.setNameA("updatedFirstObject");
model.setNameB("updatedSecondObject");
EKBCommit commit = getTestCommit().addUpdate(model);
int before = commit.getUpdates().size();
enhancer.onPreCommit(commit);
int after = commit.getUpdates().size();
assertThat(after - before == 2, is(true));
SourceModelA modelA = null;
SourceModelB modelB = null;
for (OpenEngSBModel update : commit.getUpdates()) {
if (update.retrieveModelName().equals(SourceModelA.class.getName())) {
modelA = (SourceModelA) update;
}
if (update.retrieveModelName().equals(SourceModelB.class.getName())) {
modelB = (SourceModelB) update;