public static void registerInterest() {
    InterestResultPolicy policy = InterestResultPolicy.KEYS_VALUES;
    int totalKeys = 5;
    Region region1 = cache.getRegion(SEPARATOR + REGION_NAME);
    List keylist = new ArrayList();
    for (int i = 0; i < totalKeys; i++) {
      keylist.add("key-" + i);
    }
    boolean exceptionOccurred = false;

    // test registerInterest(key)
    try {
      region1.registerInterest("DummyKey1");
    } catch (UnsupportedOperationException expected) {
      exceptionOccurred = true;
    } finally {
      if (!exceptionOccurred) {
        fail("UnsupportedOperationException was not thrown as expected for registerInterest(key)");
      }
    }

    // test registerInterest(key,policy)
    exceptionOccurred = false;
    try {
      region1.registerInterest("DummyKey2", policy);
    } catch (UnsupportedOperationException expected) {
      exceptionOccurred = true;
    } finally {
      if (!exceptionOccurred) {
        fail(
            "UnsupportedOperationException was not thrown as expected for  registerInterest(key,policy)");
      }
    }

    // test registerInterest(keylist)
    exceptionOccurred = false;
    try {
      region1.registerInterest(keylist);
    } catch (UnsupportedOperationException expected) {
      exceptionOccurred = true;
    } finally {
      if (!exceptionOccurred) {
        fail(
            "UnsupportedOperationException was not thrown as expected for registerInterest(keylist)");
      }
    }

    // test registerInterest(keylist,policy)
    exceptionOccurred = false;
    try {
      region1.registerInterest(keylist, policy);
    } catch (UnsupportedOperationException expected) {
      exceptionOccurred = true;
    } finally {
      if (!exceptionOccurred) {
        fail(
            "UnsupportedOperationException was not thrown as expected for registerInterest(keylist,policy)");
      }
    }

    // test registerInterestRegex(expr)
    exceptionOccurred = false;
    try {
      region1.registerInterestRegex("ke?");
    } catch (UnsupportedOperationException expected) {
      exceptionOccurred = true;
    } finally {
      if (!exceptionOccurred) {
        fail(
            "UnsupportedOperationException was not thrown as expected for registerInterestRegex(expr)");
      }
    }

    // test registerInterestRegex(expr,policy)
    exceptionOccurred = false;
    try {
      region1.registerInterestRegex("ke?", InterestResultPolicy.KEYS_VALUES);
    } catch (UnsupportedOperationException expected) {
      exceptionOccurred = true;
    } finally {
      if (!exceptionOccurred) {
        fail(
            "UnsupportedOperationException was not thrown as expected for registerInterestRegex(expr,policy)");
      }
    }
  }
This method invokes all the registerInterest related API's for the test-region and verifies
that <code>UnsupportedOperationException</code> is thrown in all the cases since test-region
does not have bridge-server or bridge-client.

@see Region#registerInterest(Object)
@see Region#registerInterest(Object, InterestResultPolicy)
@see Region#registerInterestRegex(String)
@see Region#registerInterestRegex(String, InterestResultPolicy)
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/NewRegionAttributesDUnitTest.java