Repository: apache/kafka
File: clients/src/test/java/org/apache/kafka/common/UuidTest.java (Java)

Code before:
    }
    
    @Test
    public void testHashCode() {
        Uuid id1 = new Uuid(16L, 7L);
        Uuid id2 = new Uuid(1043L, 20075L);
        Uuid id3 = new Uuid(104312423523523L, 200732425676585L);
        
        assertEquals(23, id1.hashCode());
        assertEquals(19064, id2.hashCode());
        assertEquals(-2011255899, id3.hashCode());
    }

    @Test
    public void testStringConversion() {
        Uuid id = Uuid.randomUuid();
        String idString = id.toString();

        assertEquals(Uuid.fromString(idString), id);

        String zeroIdString = Uuid.ZERO_UUID.toString();

        assertEquals(Uuid.ZERO_UUID, Uuid.fromString(zeroIdString));
    }

    @RepeatedTest(value = 100, name = RepeatedTest.LONG_DISPLAY_NAME)
    public void testRandomUuid() {
        Uuid randomID = Uuid.randomUuid();

        assertNotEquals(randomID, Uuid.ZERO_UUID);
        assertNotEquals(randomID, Uuid.METADATA_TOPIC_ID);
        assertFalse(randomID.toString().startsWith("-"));
    }

    @Test
    public void testCompareUuids() {
        Uuid id00 = new Uuid(0L, 0L);
        Uuid id01 = new Uuid(0L, 1L);
        Uuid id10 = new Uuid(1L, 0L);
        assertEquals(0, id00.compareTo(id00));
        assertEquals(0, id01.compareTo(id01));
        assertEquals(0, id10.compareTo(id10));
        assertEquals(-1, id00.compareTo(id01));
        assertEquals(-1, id00.compareTo(id10));
        assertEquals(1, id01.compareTo(id00));
        assertEquals(1, id10.compareTo(id00));
        assertEquals(-1, id01.compareTo(id10));
        assertEquals(1, id10.compareTo(id01));
    }

    @Test

Review comment (suggestion):
Looks like lines 84 and 85 run into the same issue as well
```java
        assertNotEquals(randomID, Uuid.ZERO_UUID);
        assertNotEquals(randomID, Uuid.METADATA_TOPIC_ID);
```

Code after:
    }
    
    @Test
    public void testHashCode() {
        Uuid id1 = new Uuid(16L, 7L);
        Uuid id2 = new Uuid(1043L, 20075L);
        Uuid id3 = new Uuid(104312423523523L, 200732425676585L);
        
        assertEquals(23, id1.hashCode());
        assertEquals(19064, id2.hashCode());
        assertEquals(-2011255899, id3.hashCode());
    }

    @Test
    public void testStringConversion() {
        Uuid id = Uuid.randomUuid();
        String idString = id.toString();

        assertEquals(Uuid.fromString(idString), id);

        String zeroIdString = Uuid.ZERO_UUID.toString();

        assertEquals(Uuid.ZERO_UUID, Uuid.fromString(zeroIdString));
    }

    @RepeatedTest(value = 100, name = RepeatedTest.LONG_DISPLAY_NAME)
    public void testRandomUuid() {
        Uuid randomID = Uuid.randomUuid();

        assertNotEquals(Uuid.ZERO_UUID, randomID);
        assertNotEquals(Uuid.METADATA_TOPIC_ID, randomID);
        assertFalse(randomID.toString().startsWith("-"));
    }

    @Test
    public void testCompareUuids() {
        Uuid id00 = new Uuid(0L, 0L);
        Uuid id01 = new Uuid(0L, 1L);
        Uuid id10 = new Uuid(1L, 0L);
        assertEquals(0, id00.compareTo(id00));
        assertEquals(0, id01.compareTo(id01));
        assertEquals(0, id10.compareTo(id10));
        assertEquals(-1, id00.compareTo(id01));
        assertEquals(-1, id00.compareTo(id10));
        assertEquals(1, id01.compareTo(id00));
        assertEquals(1, id10.compareTo(id00));
        assertEquals(-1, id01.compareTo(id10));
        assertEquals(1, id10.compareTo(id01));
    }

    @Test