@Test
public void shouldPerformQueryWhenConnectorSupportsQueries() {
List<Object[]> tuples = Collections.singletonList(new Object[] {"v1", "v2", "v3"});
Statistics statistics = mock(Statistics.class);
nextTuples = tuples;
nextStatistics = statistics;
TypeSystem typeSystem = context.getValueFactories().getTypeSystem();
Schemata schemata = ImmutableSchemata.createBuilder(context, typeSystem).addTable("t1", "c1", "c2", "c3").build();
QueryCommand query = new SqlQueryParser().parseQuery("SELECT * FROM t1", typeSystem);
QueryResults results = graph.query(query, schemata).execute();
assertThat(nextColumns, is(nullValue()));
assertThat(nextTuples, is(nullValue()));
assertThat(nextStatistics, is(nullValue()));
assertThat(results.getColumns(), is(notNullValue()));
assertThat(results.getTuples(), is(tuples));
assertThat(results.getStatistics(), is(notNullValue()));
assertNextRequestAccessQuery(graph.getCurrentWorkspaceName(), "t1", columns("t1", "c1", "c2", "c3"), Limit.NONE);
}