protected void waitOnEvent() {
    final long timeout = (System.currentTimeMillis()
        + ClientServerRegisterInterestsDUnitTest.WAIT_TIME_MILLISECONDS);

    while (entryEvents.empty() && (System.currentTimeMillis() < timeout)) {
      synchronized (this) {
        try {
          TimeUnit.MILLISECONDS.timedWait(this, Math.min(500,
              ClientServerRegisterInterestsDUnitTest.WAIT_TIME_MILLISECONDS));
        } catch (InterruptedException ignore) {
        }
      }
    }
  }
The ClientServerRegisterInterestsDUnitTest class is a test suite of test cases testing the
interaction between a client and a server in a Register Interests scenario.

@since GemFire 8.0
geode-core/src/distributedTest/java/org/apache/geode/cache/client/ClientServerRegisterInterestsDUnitTest.java