### Question:
FullSyncContributorAndProfilesTask extends Task { @Override public void performTask() throws Exception { writeTaskLog("Task started. Count of processed profiles: \n"); int index = 0; if (start != null) { index = start; } int totalCount = 0; while (true) { int counter = contributorProfileService.fullSynContributorsAndProfiles(contributorCodeType, index, size); if (counter <= 0) { break; } index += counter; totalCount += counter; if (log.isLoggable(Level.INFO)) { log.log(Level.INFO, "Full Sync Status. index: {0}, total count: {1}", new Object[]{index, totalCount}); } } writeTaskLog("\nTask Finished. Total count of processed profiles: " + totalCount); } FullSyncContributorAndProfilesTask(ContributorProfileService contributorProfileService,
											  Map<String, Object> taskConfig); protected  FullSyncContributorAndProfilesTask(); @Override void performTask(); static final String CFG_CONTRIBUTOR_TYPE_SPECIFIC_CODE_TYPE; static final String CFG_START; static final String CFG_SIZE; }### Answer:
@Test public void performTask() throws Exception { FullSyncContributorAndProfilesTask tested = getTested(); tested.contributorCodeType = "cct"; tested.performTask(); Mockito.when(tested.contributorProfileService.fullSynContributorsAndProfiles(Mockito.anyString(), Mockito.anyInt(), Mockito.anyInt())).thenReturn(0); Mockito.verify(tested.contributorProfileService).fullSynContributorsAndProfiles("cct", new Integer(0), null); Mockito.verifyNoMoreInteractions(tested.contributorProfileService); Mockito.reset(tested.contributorProfileService); tested.start = 100; tested.size = 50; tested.performTask(); Mockito.verify(tested.contributorProfileService).fullSynContributorsAndProfiles("cct", new Integer(100), new Integer(50)); Mockito.verifyNoMoreInteractions(tested.contributorProfileService); }