ESTaskStatus { @Override public String toString() { String retVal; try { retVal = getKey() + ": [" + getStatus().getState() + "] " + getStatus().getMessage(); } catch (Exception e) { retVal = getKey() + ": Unable to get message"; } return retVal; } ESTaskStatus(SerializableState state, FrameworkID frameworkID, TaskInfo taskInfo, StatePath statePath); void setStatus(TaskStatus status); TaskStatus getStatus(); TaskStatus getDefaultStatus(); TaskInfo getTaskInfo(); @Override String toString(); boolean taskInError(); static boolean errorState(TaskState state); void destroy(); static final String STATE_KEY; static final String DEFAULT_STATUS_NO_MESSAGE_SET; }
@Test public void shouldHandleNoMessageError() { status.toString(); }