public static Collection<SubquerySegment> getSubquerySegments(final SelectStatement selectStatement) {
        List<SubquerySegment> result = new LinkedList<>();
        extractSubquerySegments(result, selectStatement);
        return result;
    }
@Test
    void assertGetSubquerySegmentsInFrom1() {
        SelectStatement subquery = mock(SelectStatement.class);
        ColumnSegment left = new ColumnSegment(59, 66, new IdentifierValue("order_id"));
        LiteralExpressionSegment right = new LiteralExpressionSegment(70, 70, 1);
        when(subquery.getWhere()).thenReturn(Optional.of(new WhereSegment(53, 70, new BinaryOperationExpression(59, 70, left, right, "=", "order_id = 1"))));
        when(subquery.getFrom()).thenReturn(Optional.of(new SimpleTableSegment(new TableNameSegment(45, 51, new IdentifierValue("t_order")))));
        ProjectionsSegment subqueryProjections = new ProjectionsSegment(31, 38);
        when(subquery.getProjections()).thenReturn(subqueryProjections);
        subqueryProjections.getProjections().add(new ColumnProjectionSegment(new ColumnSegment(31, 38, new IdentifierValue("order_id"))));
        SelectStatement selectStatement = mock(SelectStatement.class);
        ProjectionsSegment projections = new ProjectionsSegment(7, 16);
        when(selectStatement.getProjections()).thenReturn(projections);
        projections.getProjections().add(new ColumnProjectionSegment(new ColumnSegment(7, 16, new IdentifierValue("order_id"))));
        SubqueryTableSegment subqueryTableSegment = new SubqueryTableSegment(0, 0, new SubquerySegment(23, 71, subquery, ""));
        when(selectStatement.getFrom()).thenReturn(Optional.of(subqueryTableSegment));
        Collection<SubquerySegment> actual = SubqueryExtractUtils.getSubquerySegments(selectStatement);
        assertThat(actual.size(), is(1));
        assertThat(actual.iterator().next(), is(subqueryTableSegment.getSubquery()));
    }