@Test
public void shouldPrintTopicDescribeExtended() throws IOException {
final KsqlEntityList entityList = new KsqlEntityList(ImmutableList.of(
new SourceDescriptionEntity(
"e",
new SourceDescription(
"TestSource", Collections.emptyList(), Collections.emptyList(),
buildTestSchema(2), DataSource.DataSourceType.KTABLE.getKqlType(),
"key", "2000-01-01", "stats", "errors", true, "avro", "kadka-topic",
2, 1))));
console.printKsqlEntityList(entityList);
final String output = terminal.getOutputString();
if (console.getOutputFormat() == OutputFormat.JSON) {
assertThat(output, containsString("\"topic\" : \"kadka-topic\""));
} else {
assertThat(output, containsString("Kafka topic : kadka-topic (partitions: 2, replication: 1)"));
}
}