// parent of topic commit should be first master commit before rebase
assertEquals(first, topicCommit.getParent(0));
// rebase topic onto master
RebaseOperation op = new RebaseOperation(repository, repository
.getRef(MASTER));
op.execute(null);
RebaseResult res = op.getResult();
assertEquals(RebaseResult.Status.STOPPED, res.getStatus());
try {
// let's try to start again, we should get a wrapped
// WrongRepositoryStateException
op = new RebaseOperation(repository, repository.getRef(MASTER));
op.execute(null);
fail("Expected Exception not thrown");
} catch (CoreException e) {
Throwable cause = e.getCause();
assertTrue(cause instanceof WrongRepositoryStateException);
}