public ProjectCleaner purge(DbSession session, String rootUuid, String projectUuid, Configuration projectConfig, Set<String> disabledComponentUuids) {
    long start = System.currentTimeMillis();
    profiler.reset();

    periodCleaner.clean(session, rootUuid, projectConfig);

    PurgeConfiguration configuration = newDefaultPurgeConfiguration(projectConfig, rootUuid, projectUuid, disabledComponentUuids);
    purgeDao.purge(session, configuration, purgeListener, profiler);

    session.commit();
    logProfiling(start, projectConfig);
    return this;
  }
@Test
  public void call_period_cleaner_index_client_and_purge_dao() {
    settings.setProperty(PurgeConstants.DAYS_BEFORE_DELETING_CLOSED_ISSUES, 5);

    underTest.purge(mock(DbSession.class), "root", "project", settings.asConfig(), emptySet());

    verify(periodCleaner).clean(any(), any(), any());
    verify(dao).purge(any(), any(), any(), any());
  }