public static boolean hasCollisionChars(String topic) {
        return topic.contains("_") || topic.contains(".");
    }
@Test
    public void testTopicHasCollisionChars() {
        List<String> falseTopics = Arrays.asList("start", "end", "middle", "many");
        List<String> trueTopics = Arrays.asList(
                ".start", "end.", "mid.dle", ".ma.ny.",
                "_start", "end_", "mid_dle", "_ma_ny."
        );

        for (String topic : falseTopics)
            assertFalse(Topic.hasCollisionChars(topic));

        for (String topic : trueTopics)
            assertTrue(Topic.hasCollisionChars(topic));
    }