@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 testResultPartitionOrThrow() {
        assertThatThrownBy(() -> adapter.getResultPartition(new IntermediateResultPartitionID()))
                .isInstanceOf(IllegalArgumentException.class);
    }