ProcessStatus { public boolean isDone() { return state.isDone(); } ProcessStatus(ProcessState state);  ProcessStatus(ProcessState state, float progress);  ProcessStatus(ProcessState state, float progress, String message); static ProcessStatus aggregate(ProcessStatus... statuses); ProcessState getState(); boolean isDone(); String getMessage(); float getProgress(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static ProcessStatus aggregateUnsustainable(ProcessStatus... statuses); final static ProcessStatus UNKNOWN; final static ProcessStatus SCHEDULED; }
@Test public void testIsDone() { assertEquals(true, new ProcessStatus(ProcessState.COMPLETED).isDone()); assertEquals(true, new ProcessStatus(ProcessState.ERROR).isDone()); assertEquals(true, new ProcessStatus(ProcessState.CANCELLED).isDone()); assertEquals(false, new ProcessStatus(ProcessState.UNKNOWN).isDone()); assertEquals(false, new ProcessStatus(ProcessState.RUNNING).isDone()); assertEquals(false, new ProcessStatus(ProcessState.SCHEDULED).isDone()); }