}
@Test
public void testIfTheEngineeringObjectReferencesUpdateWorks_shouldLoadOtherModelAndMergeIt()
throws Exception {
EngineeringObjectModel model = new EngineeringObjectModel();
model.setInternalModelName("common/reference/1");
model.setModelAId("objectA/reference/2");
model.setModelBId("objectB/reference/2");
model.setNameA("firstObject");
model.setNameB("secondObject");
EKBCommit commit = getTestCommit().addUpdate(model);
int before = commit.getUpdates().size();
enhancer.onPreCommit(commit);
int after = commit.getUpdates().size();
Object inserted = commit.getUpdates().get(commit.getUpdates().size() - 1);
EngineeringObjectModel result = (EngineeringObjectModel) inserted;
assertThat(before == after, is(true));
assertThat(result.getNameA(), is("updatedFirstObject"));
assertThat(result.getNameB(), is("updatedSecondObject"));
}