public static void unregisterInterest() {
    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);
    }

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

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

    // test unregisterInterestRegex(expr)
    exceptionOccurred = false;
    try {
      region1.unregisterInterestRegex("kp?");
    } catch (UnsupportedOperationException expected) {
      exceptionOccurred = true;
    } finally {
      if (!exceptionOccurred) {
        fail(
            "UnsupportedOperationException was not thrown as expected for unregisterInterestRegex(expr)");
      }
    }
  }
This method invokes all the unregisterInterest 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#unregisterInterest(Object)
@see Region#unregisterInterestRegex(String)
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/NewRegionAttributesDUnitTest.java