StatusReport { public StatusReport(SUBJECT subject) { this.subject = subject; setCreatedDate(new Date()); } StatusReport(SUBJECT subject); @JsonIgnore SUBJECT getSubject(); @JsonProperty("subject") URI getSubjectURI(); @JsonIgnore PARENT getParentReport(); void setParentReport(PARENT parentReport); State getState(); void setState(State state); Date getCreatedDate(); void setCreatedDate(Date createdDate); Date getStartedDate(); void setStartedDate(Date startedDate); Date getPausedDate(); void setPausedDate(Date pausedDate); Date getResumedDate(); void setResumedDate(Date resumedDate); Date getCancelledDate(); void setCancelledDate(Date cancelledDate); Date getCompletedDate(); void setCompletedDate(Date completedDate); Date getFailedDate(); void setFailedDate(Date failedDate); List<Date> getPausedDates(); List<Date> getResumedDates(); NavigableSet<Invocation> getInvocations(); void addInvocation(Invocation invocation); void outputAdded(Path path, String portName, int[] index); void addReportListener(ReportListener reportListener); void removeReportListener(ReportListener reportListener); Invocation getInvocation(String invocationName);  }
@Test public void testStatusReport() { Date preCreationTime = new Date(); statusReport = new StatusReport<Workflow,StatusReport<?,?>>(null); assertFalse(statusReport.getCreatedDate().before(preCreationTime)); assertFalse(statusReport.getCreatedDate().after(new Date())); assertEquals(State.CREATED, statusReport.getState()); assertTrue(statusReport.getPausedDates().isEmpty()); assertTrue(statusReport.getResumedDates().isEmpty()); assertNull(statusReport.getCancelledDate()); assertNull(statusReport.getCompletedDate()); assertNull(statusReport.getFailedDate()); assertNull(statusReport.getPausedDate()); assertNull(statusReport.getResumedDate()); assertNull(statusReport.getStartedDate()); }