### Question:
TaskException extends BackupException { static TaskException stateCompromised() { return new TaskException( true, DEFAULT_STATUS); } private  TaskException(Exception cause, boolean stateCompromised, int status); private  TaskException(boolean stateCompromised, int status);   }### Answer:
@Test public void testStateCompromised() { TaskException exception = TaskException.stateCompromised(); assertThat(exception.isStateCompromised()).isTrue(); assertThat(exception.getStatus()).isEqualTo(BackupTransport.TRANSPORT_ERROR); }