StatusReport { public void setCompletedDate(Date completedDate) { this.completedDate = completedDate; setState(State.COMPLETED); } 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 testSetCompletedDate() { Date now = new Date(); statusReport.setCompletedDate(now); assertEquals(now, statusReport.getCompletedDate()); assertEquals(State.COMPLETED, statusReport.getState()); }