// parent of topic commit should be first master commit before rebase
assertEquals(first, topicCommit.getParent(0));
// rebase topic onto master
RebaseOperation op = new RebaseOperation(
testRepository.getRepository(), testRepository.getRepository()
.getRef(MASTER));
op.execute(null);
RebaseResult res = op.getResult();
assertEquals(RebaseResult.Status.STOPPED, res.getStatus());
// let's try to abort this here
RebaseOperation abort = new RebaseOperation(repository, Operation.ABORT);
abort.execute(null);
RebaseResult abortResult = abort.getResult();
assertEquals(Status.ABORTED, abortResult.getStatus());
assertEquals(topicCommit, repository.resolve(Constants.HEAD));
}