}
@Test
public void testIfSourceUpdateWorksCorrectly_shouldUpdateEngineeringObject() throws Exception {
SourceModelA sourceA = new SourceModelA("sourceA/3", "sourceNameA", "shared");
SourceModelB sourceB = new SourceModelB("sourceB/3", "sourceNameB", "shared");
persist.commit(getTestEKBCommit().addInsert(sourceA).addInsert(sourceB));
EOModel eo = new EOModel("eo/3", sourceA.getEdbId(), sourceB.getEdbId(), "shared");
persist.commit(getTestEKBCommit().addInsert(eo));
sourceA = query.getModel(SourceModelA.class, getModelOid(sourceA.getEdbId()));
sourceA.setName("updatedNameA");
sourceA.setShared("updatedShared");
persist.commit(getTestEKBCommit().addUpdate(sourceA));
eo = query.getModel(EOModel.class, getModelOid(eo.getEdbId()));
sourceB = query.getModel(SourceModelB.class, getModelOid(sourceB.getEdbId()));
assertThat(eo.getNameA(), is("updatedNameA"));
assertThat(eo.getShared(), is("updatedShared"));
assertThat(sourceB.getShared(), is("updatedShared"));
}