public static String calculateHash(List<String> topics) {
        return Hashing.crc32c().hashBytes(topics.stream()
                .sorted()
                .collect(Collectors.joining(","))
                .getBytes(StandardCharsets.UTF_8)).toString();
    }
@Test
    public void testCalculateHash() {
        String topicName1 = "persistent://my-property/my-ns/pattern-topic-1";
        String topicName2 = "persistent://my-property/my-ns/pattern-topic-2";
        String topicName3 = "persistent://my-property/my-ns/pattern-topic-3";
        String hash1 = TopicList.calculateHash(Arrays.asList(topicName3, topicName2, topicName1));
        String hash2 = TopicList.calculateHash(Arrays.asList(topicName1, topicName3, topicName2));
        assertEquals(hash1, hash2, "Hash must not depend on order of topics in the list");

        String hash3 = TopicList.calculateHash(Arrays.asList(topicName1, topicName2));
        assertNotEquals(hash1, hash3, "Different list must have different hashes");

    }