public void Equality()
        {
            var a   = new TopicPartition("a", 31);
            var a2  = new TopicPartition("a", 31);
            var nes = new List <TopicPartition> {
                new TopicPartition("b", 31),
                new TopicPartition("a", 32),
            };

            Assert.Equal(a, a2);
            Assert.True(a.Equals(a2));
            Assert.True(a == a2);
            Assert.False(a != a2);

            foreach (var ne in nes)
            {
                Assert.NotEqual(a, ne);
                Assert.False(a.Equals(ne));
                Assert.False(a == ne);
                Assert.True(a != ne);
            }
        }
        public void NullEquality()
        {
            var            tp1 = new TopicPartition("a", 31);
            TopicPartition tp2 = null;
            TopicPartition tp3 = null;

            Assert.NotEqual(tp1, tp2);
            Assert.False(tp1.Equals(tp2));
            Assert.False(tp1 == tp2);
            Assert.True(tp1 != tp2);

            Assert.NotEqual(tp2, tp1);
            Assert.False(tp2 == tp1);
            Assert.True(tp2 != tp1);

            Assert.Equal(tp2, tp3);
            Assert.True(tp2 == tp3);
            Assert.False(tp2 != tp3);
        }