Set<SourceName> analyzeExpression(
      final Expression expression,
      final String clauseType
  ) {
    final Validator extractor = new Validator(clauseType);
    extractor.process(expression, null);
    return extractor.referencedSources;
  }
@Test
  public void shouldGetSourceForUnqualifiedColumnRef() {
    // Given:
    final ColumnName column = ColumnName.of("qualified");
    final Expression expression = new QualifiedColumnReferenceExp(
        SourceName.of("fully"),
        column
    );

    when(sourceSchemas.sourcesWithField(any(), any())).thenReturn(sourceNames("something"));

    // When:
    analyzer.analyzeExpression(expression, CLAUSE_TYPE);

    // Then:
    verify(sourceSchemas).sourcesWithField(Optional.of(SourceName.of("fully")), column);
  }