### Question:
JobQueueBatch implements Serializable { public void restartBatch() { this.status = JobStatus.QUEUED; this.patientIndex = null; this.startTime = null; this.completeTime = null; this.aggregatorID = null; this.getJobQueueBatchFiles().clear(); this.setUpdateTime(); } JobQueueBatch();  JobQueueBatch(UUID jobID,
                         UUID orgID,
                         String providerID,
                         List<String> patients,
                         List<ResourceType> resourceTypes,
                         OffsetDateTime since,
                         OffsetDateTime transactionTime); static Boolean isValidResourceType(ResourceType type); Boolean isValid(); UUID getBatchID(); UUID getJobID(); UUID getOrgID(); String getProviderID(); JobStatus getStatus(); Integer getPriority(); List<String> getPatients(); Optional<Integer> getPatientIndex(); List<ResourceType> getResourceTypes(); Optional<OffsetDateTime> getSince(); OffsetDateTime getTransactionTime(); Optional<UUID> getAggregatorID(); void setAggregatorIDForTesting(UUID aggregatorID); Optional<OffsetDateTime> getUpdateTime(); Optional<OffsetDateTime> getSubmitTime(); Optional<OffsetDateTime> getStartTime(); Optional<OffsetDateTime> getCompleteTime(); void setCompleteTime(OffsetDateTime time); List<JobQueueBatchFile> getJobQueueBatchFiles(); Optional<JobQueueBatchFile> getJobQueueFile(ResourceType forResourceType); Optional<JobQueueBatchFile> getJobQueueFile(String fileName); synchronized Optional<JobQueueBatchFile> getJobQueueFileLatest(ResourceType forResourceType); synchronized JobQueueBatchFile addJobQueueFile(ResourceType resourceType, int sequence, int batchSize); void setRunningStatus(UUID aggregatorID); Optional<String> fetchNextPatient(UUID aggregatorID); void setPausedStatus(UUID aggregatorID); void setCompletedStatus(UUID aggregatorID); void setFailedStatus(UUID aggregatorID); void restartBatch(); void setPriority(Integer priority); void setUpdateTime(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final List<ResourceType> validResourceTypes; }### Answer:
@Test void testRestartBatch() { final var job = createJobQueueBatch(); job.setRunningStatus(aggregatorID); job.setFailedStatus(aggregatorID); job.restartBatch(); assertEquals(JobStatus.QUEUED, job.getStatus()); assertNull(job.patientIndex); assertNull(job.startTime); assertNull(job.completeTime); assertNull(job.aggregatorID); assertTrue(job.getJobQueueBatchFiles().isEmpty()); }