@Test
  public void testUnregisterInterestKeys() throws Exception {
    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(list, 0, 0));
    client1.invoke(UnregisterInterestDUnitTest.class, "registerInterest", new Object[] {list,
        receiveValuesConstant, new String[] {"key_1", "key_2", "key_3", "key_4", "key_5"}});
    client2.invoke(UnregisterInterestDUnitTest.class, "registerInterest", new Object[] {list,
        !receiveValuesConstant, new String[] {"key_1", "key_2", "key_3", "key_4", "key_5"}});
    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(list, 1, 1));
    client1.invoke(UnregisterInterestDUnitTest::closeCache);
    client2.invoke(UnregisterInterestDUnitTest::closeCache);
    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(list, 0, 0));
  }
The test starts two clients who register interest in a list keys but close without
unregistering the same. The test then verifies that the server cleans up the register interest
artifacts of these clients properly.

See bug #47619
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java