### Question:
AuditOperations { public PrintJobAuditResponse allPrintJobsAudit(){ AuditQuery query = auditService.getPrintJobAuditQuery(); query.addOrder(AuditEntity.revisionNumber().desc()); List<PrintJobAuditModel> auditList = auditService.processPrintJobAuditQuery(query); return new PrintJobAuditResponse(auditList); } AuditOperations(AuditService auditService); PrintJobAuditResponse allPrintJobsAudit(); PrintJobAuditResponse printJobAuditById(Integer printJobId); AuditPrintJobColorCountResponse printJobAuditColorsYearly(); PrintJobAuditForLastTwelveMonthsResponse printNumberOfAllPrintJobsForLastTwelveMonths();  }### Answer:
@Test public void allPrintJobsAuditSuccess() { PrintJobAuditModel auditModel = new PrintJobAuditModel(); auditModel.setId(3); auditModel.setColor("red"); auditModel.setEmailHash("no hash here"); List<PrintJobAuditModel> auditList = new ArrayList<>(); auditList.add(auditModel); AuditQuery query = mock(AuditQuery.class); when(auditService.processPrintJobAuditQuery(any(AuditQuery.class))).thenReturn(auditList); when(auditService.getPrintJobAuditQuery()).thenReturn(query); PrintJobAuditResponse response = operations.allPrintJobsAudit(); PrintJobAuditModel returnedAuditModel = response.getData().get(0); assertEquals(response.getData(), auditList); assertEquals(returnedAuditModel.getId(), auditModel.getId()); assertEquals(returnedAuditModel.getColor(), "red"); assertEquals(returnedAuditModel.getEmailHash(), "no hash here"); }