@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CoordinatorRecord record = (CoordinatorRecord) o;

        if (!Objects.equals(key, record.key)) return false;
        return Objects.equals(value, record.value);
    }
@Test
    public void testEquals() {
        ApiMessageAndVersion key = new ApiMessageAndVersion(mock(ApiMessage.class), (short) 0);
        ApiMessageAndVersion value = new ApiMessageAndVersion(mock(ApiMessage.class), (short) 0);
        CoordinatorRecord record1 = new CoordinatorRecord(key, value);
        CoordinatorRecord record2 = new CoordinatorRecord(key, value);
        assertEquals(record1, record2);
    }