### Question:
TaskException extends BackupException { static TaskException forStatus(int status) { Preconditions.checkArgument( status != BackupTransport.TRANSPORT_OK, "Exception based on TRANSPORT_OK"); return new TaskException( false, status); } private  TaskException(Exception cause, boolean stateCompromised, int status); private  TaskException(boolean stateCompromised, int status);   }### Answer:
@Test public void testForStatus_whenTransportOk_throws() { expectThrows( IllegalArgumentException.class, () -> TaskException.forStatus(BackupTransport.TRANSPORT_OK)); }