### Question:
PartitionedOutputBuffer implements OutputBuffer { @Override public void acknowledge(OutputBufferId outputBufferId, long sequenceId) { requireNonNull(outputBufferId, "bufferId is null"); partitions.get(outputBufferId.getId()).acknowledgePages(sequenceId); } PartitionedOutputBuffer(
            String taskInstanceId,
            StateMachine<BufferState> state,
            OutputBuffers outputBuffers,
            DataSize maxBufferSize,
            Supplier<LocalMemoryContext> systemMemoryContextSupplier,
            Executor notificationExecutor); @Override void addStateChangeListener(StateChangeListener<BufferState> stateChangeListener); @Override boolean isFinished(); @Override double getUtilization(); @Override boolean isOverutilized(); @Override OutputBufferInfo getInfo(); @Override void setOutputBuffers(OutputBuffers newOutputBuffers); @Override ListenableFuture<?> isFull(); @Override void enqueue(List<SerializedPage> pages); @Override void enqueue(int partitionNumber, List<SerializedPage> pages); @Override ListenableFuture<BufferResult> get(OutputBufferId outputBufferId, long startingSequenceId, DataSize maxSize); @Override void acknowledge(OutputBufferId outputBufferId, long sequenceId); @Override void abort(OutputBufferId bufferId); @Override void setNoMorePages(); @Override void destroy(); @Override void fail(); @Override long getPeakMemoryUsage();  }### Answer:
@Test public void testAcknowledge() { int partitionId = 0; PartitionedOutputBuffer buffer = createPartitionedBuffer( createInitialEmptyOutputBuffers(PARTITIONED) .withBuffer(FIRST, partitionId) .withNoMoreBufferIds(), sizeOfPages(20)); for (int i = 0; i < 3; i++) { addPage(buffer, createPage(i), partitionId); } assertQueueState(buffer, FIRST, 3, 0); assertBufferResultEquals(TYPES, getBufferResult(buffer, FIRST, 0, sizeOfPages(10), NO_WAIT), bufferResult(0, createPage(0), createPage(1), createPage(2))); acknowledgeBufferResult(buffer, FIRST, 2); assertQueueState(buffer, FIRST, 1, 2); acknowledgeBufferResult(buffer, FIRST, 3); assertQueueState(buffer, FIRST, 0, 3); try { acknowledgeBufferResult(buffer, FIRST, 4); } catch (IllegalArgumentException e) { assertEquals(e.getMessage(), "Invalid sequence id"); } for (int i = 3; i < 6; i++) { addPage(buffer, createPage(i), partitionId); } assertQueueState(buffer, FIRST, 3, 3); buffer.get(FIRST, 3, sizeOfPages(1)).cancel(true); assertQueueState(buffer, FIRST, 3, 3); }