private static void registerKeyEx(Object key) {
    try {
      registerKeyOnly(key);
      fail("Expected an exception during register interest with no available servers.");
    } catch (NoSubscriptionServersAvailableException ex) {
      // expected an exception
      LogWriterUtils.getLogWriter().info("Got expected exception in registerKey: ");
    }
  }
exercises the ClientSession interface to register interest in a server on behalf of a client

@param clientId the DM of the client
@param key the key that the client is interested in
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/InterestListDUnitTest.java