class SimpleCatalogUtilsService implements CatalogUtilsService {

    @Override
    public void addCommit(Branch branch, Commit commit, RepositoryConnection conn) {
        if (conn.containsContext(commit.getResource())) {
            throw throwAlreadyExists(commit.getResource(), commitFactory);
        }
        branch.setHead(commit);
        updateObject(branch, conn);
        addObject(commit, conn);
    }

}