@Override
    public int hashCode() {
        return Objects.hash(name, numPartitions, replicationFactor, replicasAssignments, configs);
    }
@Test
    public void testEqualsAndHashCode() {
        NewTopic topic1 = new NewTopic(TEST_TOPIC, NUM_PARTITIONS, REPLICATION_FACTOR);
        NewTopic topic2 = new NewTopic(TEST_TOPIC, NUM_PARTITIONS, REPLICATION_FACTOR);
        NewTopic topic3 = new NewTopic("another-topic", NUM_PARTITIONS, REPLICATION_FACTOR);

        assertEquals(topic1, topic2);
        assertNotEquals(topic1, topic3);
        assertEquals(topic1.hashCode(), topic2.hashCode());
        assertNotEquals(topic1.hashCode(), topic3.hashCode());
    }