@Test
public void uploadProjectTHIN() throws Exception {

  final User uploader = new User("test_user");
  final File projectZipFile = setupTestTHIN();
  // When archiveUnthinner is called, ensure it is called with the correct params
  doAnswer((Answer<Map<String, ValidationReport>>) invocation -> {
    File projectFolder = (File) invocation.getArguments()[1];
    File startupDependenciesFile = (File) invocation.getArguments()[2];
    assertEquals(ThinArchiveUtils.getStartupDependenciesFile(projectFolder), startupDependenciesFile);
    return new HashMap();
  }).when(this.archiveUnthinner).validateThinProject(any(), any(), any(), any());
  this.project.setVersion(this.VERSION);
  checkValidationReport(this.azkabanProjectLoader
      .uploadProject(this.project, projectZipFile, "zip", uploader, null,
          IPv6));
  verify(this.projectStorageManager)
      .uploadProject(eq(this.project), eq(this.VERSION + 1), eq(projectZipFile),
          any(File.class), eq(uploader), anyString());
  verify(this.projectLoader).cleanOlderProjectVersion(this.project.getId(), this.VERSION - 3,
      Arrays.asList(this.VERSION));
  // Verify that the archiveUnthinner was called
  verify(this.archiveUnthinner).validateThinProject(any(), any(), any(), any());
}