### Question:
Console implements Closeable { public void printStreamedRow(StreamedRow row) throws IOException { if (row.getErrorMessage() != null) { printErrorMessage(row.getErrorMessage()); } else { switch (outputFormat) { case JSON: printAsJson(row.getRow().getColumns()); break; case TABULAR: printAsTable(row.getRow()); break; default: throw new RuntimeException(String.format( "Unexpected output format: '%s'", outputFormat.name() )); } } } Console(OutputFormat outputFormat, KsqlRestClient restClient); abstract PrintWriter writer(); abstract void flush(); abstract int getWidth(); abstract Terminal.SignalHandler handle(
      Terminal.Signal signal,
      Terminal.SignalHandler signalHandler
  ); void addResult(GenericRow row); void addResult(List<String> columnHeaders, List<List<String>> rowValues); LinkedHashMap<String, CliSpecificCommand> getCliSpecificCommands(); LineReader getLineReader(); void printErrorMessage(KsqlErrorMessage errorMessage); void printError(String shortMsg, String fullMsg); void printStreamedRow(StreamedRow row); void printKsqlEntityList(List<KsqlEntity> entityList); void registerCliSpecificCommand(CliSpecificCommand cliSpecificCommand); void setOutputFormat(String newFormat);  }### Answer:
@Test public void testPrintGenericStreamedRow() throws IOException { StreamedRow row = new StreamedRow(new GenericRow(Arrays.asList("col_1", "col_2"))); terminal.printStreamedRow(row); }
@Test public void testPrintErrorStreamedRow() throws IOException { StreamedRow row = new StreamedRow(new FakeException()); terminal.printStreamedRow(row); }