@Override
    public DefaultResultPartition getResultPartition(
            final IntermediateResultPartitionID intermediateResultPartitionId) {
        final DefaultResultPartition resultPartition =
                resultPartitionsById.get(intermediateResultPartitionId);
        if (resultPartition == null) {
            throw new IllegalArgumentException(
                    "can not find partition: " + intermediateResultPartitionId);
        }
        return resultPartition;
    }
@Test
    void testGetResultPartition() {
        for (ExecutionVertex vertex : executionGraph.getAllExecutionVertices()) {
            for (Map.Entry<IntermediateResultPartitionID, IntermediateResultPartition> entry :
                    vertex.getProducedPartitions().entrySet()) {
                IntermediateResultPartition partition = entry.getValue();
                DefaultResultPartition schedulingResultPartition =
                        adapter.getResultPartition(entry.getKey());

                assertPartitionEquals(partition, schedulingResultPartition);
            }
        }
    }