### Question:
HarvestAccessor { public List<Task> getCurrentHarvestsList() { WebTarget target = client.target(restUrl + "/" + DatasetOptionListContainer.DATASETS + "/" + HarvestOptionListContainer.HARVESTS); Response response = target.request(MediaType.APPLICATION_JSON).get(); List<Task> tasksList = response.readEntity(new GenericType<List<Task>>() {}); LOGGER.info("getCurrentHarvestsList(..) success!"); return tasksList; } HarvestAccessor(URL restUrl, String username, String password);   HarvestAccessor(URL restUrl, String username, String password, Client client); void startHarvest(String id, String type); void cancelHarvest(String id); void scheduleHarvest(String id, Calendar firstDateTime, Frequency frequency, int xmonths,
      boolean incremental); void deleteScheduledTask(String id, String taskId); List<ScheduledTask> getDatasetScheduledTasks(String id); String getDatasetHarvestingStatus(String id); String getDatasetLastIngestLog(String id); List<Task> getCurrentHarvestsList();  }### Answer:
@Test public void testGetCurrentHarvestsList(){ Mockito.when(response.getStatus()).thenReturn(200); Mockito.when(response.readEntity(Result.class)).thenReturn(new Result("Success!")); ha.getCurrentHarvestsList(); }