public static Collection<SubquerySegment> getSubquerySegments(final SelectStatement selectStatement) {
        List<SubquerySegment> result = new LinkedList<>();
        extractSubquerySegments(result, selectStatement);
        return result;
    }
@Test
    void assertGetSubquerySegmentsWithMultiNestedSubquery() {
        SelectStatement selectStatement = mock(SelectStatement.class);
        SubquerySegment subquerySelect = createSubquerySegmentForFrom();
        when(selectStatement.getFrom()).thenReturn(Optional.of(new SubqueryTableSegment(0, 0, subquerySelect)));
        Collection<SubquerySegment> actual = SubqueryExtractUtils.getSubquerySegments(selectStatement);
        assertThat(actual.size(), is(2));
    }