// when
when(commit.getProjectName()).thenReturn("projectname");
when(commit.getChange()).thenReturn("1");
when(commit.getPatch()).thenReturn("2");
String command = GerritCommand.createCodeReview(commit, new SonarAnalysisResult("Sonar analysis",
SonarAnalysisStatus.NO_PROBLEMS));
// then
assertEquals("gerrit approve --project projectname --message \"Sonar analysis\" --code-review 1 1,2", command);
}