### Question:
KsqlResource { private Queries showQueries(String statementText) { List<Queries.RunningQuery> runningQueries = new ArrayList<>(); for (PersistentQueryMetadata persistentQueryMetadata : ksqlEngine.getPersistentQueries().values() ) { KsqlStructuredDataOutputNode ksqlStructuredDataOutputNode = (KsqlStructuredDataOutputNode) persistentQueryMetadata.getOutputNode(); runningQueries.add(new Queries.RunningQuery( persistentQueryMetadata.getStatementString(), ksqlStructuredDataOutputNode.getKafkaTopicName(), persistentQueryMetadata.getQueryId() )); } return new Queries(statementText, runningQueries); } KsqlResource(
      KsqlEngine ksqlEngine,
      CommandStore commandStore,
      StatementExecutor statementExecutor,
      long distributedCommandResponseTimeout
  ); @POST Response handleKsqlStatements(KsqlRequest request); List<String> getStatementStrings(String ksqlString); KsqlEngine getKsqlEngine();  }### Answer:
@Test public void testShowQueries() throws Exception { KsqlResource testResource = TestKsqlResourceUtil.get(ksqlEngine); final String ksqlString = "SHOW QUERIES;"; final ListQueries ksqlStatement = new ListQueries(Optional.empty()); final String testKafkaTopic = "lol"; final String testQueryStatement = String.format( "CREATE STREAM %s AS SELECT * FROM test_stream WHERE S2_F2 > 69;", testKafkaTopic ); Queries queries = makeSingleRequest( testResource, ksqlString, Collections.emptyMap(), Queries.class ); List<Queries.RunningQuery> testQueries = queries.getQueries(); assertEquals(0, testQueries.size()); }