AbstractWorkflowItem implements WorkflowItem, WorkflowStatusListener { @Override public final void setStatus(ProcessStatus newStatus) { if (!newStatus.equals(status) && !newStatus.equals(ProcessStatus.UNKNOWN)) { ProcessStatus oldStatus = status; status = newStatus; fireStatusChanged(new WorkflowStatusEvent(this, oldStatus, newStatus, new Date())); } } AbstractWorkflowItem(); protected  AbstractWorkflowItem(ProcessStatus status); @Override void addWorkflowStatusListener(WorkflowStatusListener l); @Override final ProcessStatus getStatus(); @Override final void setStatus(ProcessStatus newStatus); @Override WorkflowItem[] getItems(); @Override Object[] getJobIds(); @Override void handleStatusChanged(WorkflowStatusEvent event); @Override Date getSubmitTime(); @Override Date getStartTime(); @Override Date getStopTime(); void setSubmitTime(Date submitTime); void setStartTime(Date startTime); void setStopTime(Date stopTime); WorkflowStatusListener[] getWorkflowStatusListeners();  }
@Test(expected = NullPointerException.class) public void testStateCannotBeNull() { workflow.setStatus(null); }