public static void extractJoinConditions(final Collection<BinaryOperationExpression> joinConditions, final Collection<WhereSegment> whereSegments) {
        for (WhereSegment each : whereSegments) {
            if (each.getExpr() instanceof BinaryOperationExpression && ((BinaryOperationExpression) each.getExpr()).getLeft() instanceof ColumnSegment
                    && ((BinaryOperationExpression) each.getExpr()).getRight() instanceof ColumnSegment) {
                joinConditions.add((BinaryOperationExpression) each.getExpr());
            }
        }
    }
@Test
    void assertExtractJoinConditions() {
        Collection<BinaryOperationExpression> actual = new LinkedList<>();
        BinaryOperationExpression binaryExpression =
                new BinaryOperationExpression(0, 0, new ColumnSegment(0, 0, new IdentifierValue("order_id")), new ColumnSegment(0, 0, new IdentifierValue("order_id")), "=", "");
        ExpressionExtractUtils.extractJoinConditions(actual, Collections.singleton(new WhereSegment(0, 0, binaryExpression)));
        assertThat(actual.size(), is(1));
        assertThat(actual.iterator().next(), is(binaryExpression));
    }