public boolean isBackPressured() {
        if (invokable == null
                || partitionWriters.length == 0
                || (executionState != ExecutionState.INITIALIZING
                        && executionState != ExecutionState.RUNNING)) {
            return false;
        }
        for (int i = 0; i < partitionWriters.length; ++i) {
            if (!partitionWriters[i].isAvailable()) {
                return true;
            }
        }
        return false;
    }
@Test
    public void testNoBackPressureIfTaskNotStarted() throws Exception {
        final Task task = createTaskBuilder().build(Executors.directExecutor());
        assertFalse(task.isBackPressured());
    }