### Question:
UpdateContributorProfileTask extends Task { @Override public void performTask() throws Exception { int i = 0; if (contributorCodeValues == null) { i = contributorProfileService.createOrUpdateAllProfiles(contributorCodeType); } else { for (String v : contributorCodeValues) { i++; contributorProfileService.createOrUpdateProfile(contributorCodeType, v, true); } } writeTaskLog(i + " contributor profiles processed."); } UpdateContributorProfileTask(ContributorProfileService contributorProfileService,
			Map<String, Object> taskConfig); protected  UpdateContributorProfileTask(); @Override void performTask(); static final String CFG_CONTRIBUTOR_TYPE_SPECIFIC_CODE_TYPE; static final String CFG_CONTRIBUTOR_TYPE_SPECIFIC_CODE_VALUE; }### Answer:
@Test public void performTask() throws Exception { UpdateContributorProfileTask tested = getTested(); tested.contributorCodeType = "cct"; tested.contributorCodeValues = null; tested.performTask(); Mockito.verify(tested.contributorProfileService).createOrUpdateAllProfiles("cct"); Mockito.verifyNoMoreInteractions(tested.contributorProfileService); Mockito.reset(tested.contributorProfileService); tested.contributorCodeValues = new String[] { "homers", "quimby" }; tested.performTask(); Mockito.verify(tested.contributorProfileService).createOrUpdateProfile("cct", "homers", true); Mockito.verify(tested.contributorProfileService).createOrUpdateProfile("cct", "quimby", true); Mockito.verifyNoMoreInteractions(tested.contributorProfileService); }