ShowDatabasesBackendHandler implements TextProtocolBackendHandler { @Override public BackendResponse execute() { mergedResult = new SingleLocalDataMergedResult(getSchemaNames()); return new QueryResponse(Collections.singletonList(new QueryHeader("information_schema", "SCHEMATA", "Database", "SCHEMA_NAME", 100, Types.VARCHAR, 0, false, false, false, false))); }  @Override BackendResponse execute(); @Override boolean next(); @Override QueryData getQueryData();  }
@Test public void assertExecuteShowDatabaseBackendHandler() { QueryResponse actual = (QueryResponse) showDatabasesBackendHandler.execute(); assertThat(actual, instanceOf(QueryResponse.class)); assertThat(actual.getQueryHeaders().size(), is(1)); }