@Test
  public void testAttributesMutatorBogus() throws CacheException {
    String name = getUniqueName();
    Region region = createRegion(name);
    AttributesMutator mutator = region.getAttributesMutator();

    try {
      mutator.setEntryIdleTimeout(null);
      fail("Should have thrown an IllegalArgumentException");

    } catch (IllegalArgumentException ex) {
      // pass...
    }

    try {
      mutator.setEntryTimeToLive(null);
      fail("Should have thrown an IllegalArgumentException");

    } catch (IllegalArgumentException ex) {
      // pass...
    }

    try {
      mutator.setRegionIdleTimeout(null);
      fail("Should have thrown an IllegalArgumentException");

    } catch (IllegalArgumentException ex) {
      // pass...
    }

    try {
      mutator.setRegionTimeToLive(null);
      fail("Should have thrown an IllegalArgumentException");

    } catch (IllegalArgumentException ex) {
      // pass...
    }

    // Exception if stats not enabled
    try {
      mutator.setEntryIdleTimeout(new ExpirationAttributes(1, ExpirationAction.DESTROY));
      fail("Should have thrown an IllegalStateException");
    } catch (IllegalStateException ex) {
      // pass...
    }

    // Exception if stats not enabled
    try {
      mutator.setEntryTimeToLive(new ExpirationAttributes(1, ExpirationAction.DESTROY));
      fail("Should have thrown an IllegalStateException");
    } catch (IllegalStateException ex) {
      // pass
    }

    // Exception if stats not enabled
    try {
      mutator.setRegionIdleTimeout(new ExpirationAttributes(1, ExpirationAction.DESTROY));
      fail("Should have thrown an IllegalStateException");
    } catch (IllegalStateException ex) {
      // pass...
    }

    // Exception if stats not enabled
    try {
      mutator.setRegionTimeToLive(new ExpirationAttributes(1, ExpirationAction.DESTROY));
      fail("Should have thrown an IllegalStateException");

    } catch (IllegalStateException ex) {
      // pass

    }
  }
Tests sending <code>null</code> or bogus values to an {@link AttributesMutator}.
geode-core/src/distributedTest/java/org/apache/geode/cache30/RegionAttributesTestCase.java