@Override
    public DefaultExecutionVertex getVertex(final ExecutionVertexID vertexId) {
        final DefaultExecutionVertex executionVertex = executionVertices.get(vertexId);
        if (executionVertex == null) {
            throw new IllegalArgumentException(
                    String.format("Execution vertex %s not found in pipelined region", vertexId));
        }
        return executionVertex;
    }
@Test
    void gettingUnknownVertexThrowsException() {
        final Map<IntermediateResultPartitionID, DefaultResultPartition> resultPartitionById =
                Collections.emptyMap();
        final DefaultSchedulingPipelinedRegion pipelinedRegion =
                new DefaultSchedulingPipelinedRegion(
                        Collections.emptySet(), resultPartitionById::get);
        final ExecutionVertexID unknownVertexId = new ExecutionVertexID(new JobVertexID(), 0);
        assertThatThrownBy(() -> pipelinedRegion.getVertex(unknownVertexId))
                .withFailMessage("Expected exception not thrown")
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessageContaining(unknownVertexId + " not found");
    }