@Test
public void testLoadingOfEKBCommits_shouldLoadAllInformation() throws Exception {
TestModelDecorator model = getTestModelDecorator();
model.setEdbId("ekbload/1");
model.setName("test");
EKBCommit commit = getTestEKBCommit().addInsert(model.getModel());
commit.setComment("This is the first comment");
persist.commit(commit);
String revision = commit.getRevisionNumber().toString();
model.setName("test2");
commit = getTestEKBCommit().addUpdate(model.getModel());
commit.setComment("This is the second comment");
persist.commit(commit);
String revision2 = commit.getRevisionNumber().toString();
commit = query.loadCommit(revision);
assertThat(commit, notNullValue());
assertThat(commit.getInserts().size(), is(1));
assertThat(commit.getRevisionNumber().toString(), is(revision));
assertThat(commit.getDomainId(), is(getTestEKBCommit().getDomainId()));
assertThat(commit.getConnectorId(), is(getTestEKBCommit().getConnectorId()));
assertThat(commit.getInstanceId(), is(getTestEKBCommit().getInstanceId()));
assertThat(commit.getComment(), is("This is the first comment"));
commit = query.loadCommit(revision2);
assertThat(commit, notNullValue());
assertThat(commit.getUpdates().size(), is(1));
assertThat(commit.getRevisionNumber().toString(), is(revision2));
assertThat(commit.getParentRevisionNumber().toString(), is(revision));
assertThat(commit.getDomainId(), is(getTestEKBCommit().getDomainId()));
assertThat(commit.getConnectorId(), is(getTestEKBCommit().getConnectorId()));
assertThat(commit.getInstanceId(), is(getTestEKBCommit().getInstanceId()));
assertThat(commit.getComment(), is("This is the second comment"));
}