public static void checkKeyList(Integer value, Integer valueInv) {
    FilterProfile fp = ((GemFireCacheImpl) cache).getFilterProfile(regionname);
    assertEquals(value.intValue(), fp.getKeysOfInterestSize());
    assertEquals(valueInv.intValue(), fp.getKeysOfInterestInvSize());
  }
The test starts two clients who register interest with the same regular expression, with the
option of receiving updates as invalidates. One of the clients later unregisters its interest
with the regular expression. Server then does some puts on the keys. The test then verifies
that the server does send these updates to the second client while the first client sees no
events.

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