@Test
public void testFileRenameInsertionStatement() {

    long count = 0;
    Commit commit = generateCommit("sha", 1);
    Commit anotherSha = generateCommit("anotherSha", 1);
    GitRename rename = new GitRename("old", "new", 100);
    executeSuccess(queries.commitInsertionStatement(projectId, commit, GitDiff.EMPTY));
    executeSuccess(queries.commitInsertionStatement(projectId, anotherSha, GitDiff.EMPTY));
    // We can insert any rename
    executeSuccess(queries.fileRenameInsertionStatement(projectId, commit.sha, rename));
    assertEquals(++count, getRenameCount());
    // We can insert the same rename in another project
    int secondProjectID = createProject("anotherProject");
    executeSuccess(queries.commitInsertionStatement(secondProjectID, commit, GitDiff.EMPTY));
    executeSuccess(queries.fileRenameInsertionStatement(secondProjectID, commit.sha, rename));
    assertEquals(++count, getRenameCount());
    // We can insert the same rename in another commit
    executeSuccess(queries.fileRenameInsertionStatement(projectId, anotherSha.sha, rename));
    assertEquals(++count, getRenameCount());
    // We can insert any other rename
    GitRename anotherRename = new GitRename("new", "old", 50);
    executeSuccess(queries.fileRenameInsertionStatement(projectId, commit.sha, anotherRename));
    assertEquals(++count, getRenameCount());
    // We can't insert the same rename in the same commit of the same project
    executeNothinhDone(queries.fileRenameInsertionStatement(projectId, commit.sha, rename));
    assertEquals(count, getRenameCount());
}