@Test
public void cleanOlderProjectVersion() {

  createThreeProjects();
  final Project project = this.loader.fetchProjectByName("mytestProject");
  final File testFile = new File(getClass().getClassLoader().getResource(SAMPLE_FILE).getFile());
  final int newVersion = this.loader.getLatestProjectVersion(project) + 1;
  this.loader.uploadProjectFile(project.getId(), newVersion, testFile, "uploadUser1",
      IPv4);
  final ProjectFileHandler fileHandler = this.loader.getUploadedFile(project.getId(), newVersion);
  Assert.assertEquals(fileHandler.getNumChunks(), 1);
  assertNumChunks(project, newVersion, 1);
  this.loader.cleanOlderProjectVersion(project.getId(), newVersion + 1, Collections.emptyList());
  assertNumChunks(project, newVersion, 0);
  assertGetUploadedFileOfCleanedVersion(project.getId(), newVersion);
}