public static void registerInterest(Object interestPolicy, Object totalKeysToRegister) {
    InterestResultPolicy policy = (InterestResultPolicy) interestPolicy;
    int totalKeys = (Integer) totalKeysToRegister;
    Region region1 = cache.getRegion(SEPARATOR + REGION_NAME);
    LogWriter logger = cache.getLogger();
    logger.fine("Registering interest in " + totalKeys + " keys");
    List keylist = new ArrayList();
    for (int i = 0; i < totalKeys; i++) {
      keylist.add("key-" + i);
    }

    try {
      region1.registerInterest(keylist, policy);
    } catch (CacheWriterException e) {
      Assert.fail("failed to register interestlist for the client", e);
    }
  }
Registers the test region on client with a keylist containing all keys pre-populated on server
and a given {@link InterestResultPolicy} type.

@param interestPolicy - InterestResultPolicy type specified (NONE,KEYS,KEY_VALUES or DEFAULT)
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java