@Test
public void testCreateTopic() {

    final String newTopic = "TestTopic-" + System.currentTimeMillis();
    // Sanity test to validate our topic doesn't exist
    TopicList topicsList = kafkaOperations.getAvailableTopics();
    assertFalse("Should not contain our topic yet", topicsList.getTopicNames().contains(newTopic));
    // Create our topic
    final boolean result = kafkaOperations.createTopic(new CreateTopic(newTopic, 1, (short) 1));
    assertTrue("Should have true return result", result);
    // Validate topic exists now.
    topicsList = kafkaOperations.getAvailableTopics();
    assertTrue("Should contain our topic now", topicsList.getTopicNames().contains(newTopic));
}