@Override
    public Iterable<DefaultExecutionVertex> getVertices() {
        return Collections.unmodifiableCollection(executionVertices.values());
    }
@Test
    void returnsVertices() {
        final DefaultExecutionVertex vertex =
                new DefaultExecutionVertex(
                        new ExecutionVertexID(new JobVertexID(), 0),
                        Collections.emptyList(),
                        () -> ExecutionState.CREATED,
                        Collections.emptyList(),
                        partitionID -> {
                            throw new UnsupportedOperationException();
                        });

        final Set<DefaultExecutionVertex> vertices = Collections.singleton(vertex);
        final Map<IntermediateResultPartitionID, DefaultResultPartition> resultPartitionById =
                Collections.emptyMap();
        final DefaultSchedulingPipelinedRegion pipelinedRegion =
                new DefaultSchedulingPipelinedRegion(vertices, resultPartitionById::get);
        final Iterator<DefaultExecutionVertex> vertexIterator =
                pipelinedRegion.getVertices().iterator();

        assertThat(vertexIterator).hasNext();
        assertThat(vertexIterator.next()).isSameAs(vertex);
        assertThat(vertexIterator.hasNext()).isFalse();
    }