@Test
  public void testGetRegionFactoryWithIsGlobalScope() throws Exception {
    serverOptions = JSONFormatter.fromJSON("{ \"scope\": \"GLOBAL\" }");
    new ScopeOption(serverOptions).setOptionOnRegionFactory(regionFactory);

    Region region = regionFactory.create(getCurrentTestName());
    assertThat(region.getAttributes().getScope(), equalTo(Scope.GLOBAL));
  }
  @Test
  public void testGetRegionFactoryWithInvalidScope() throws Exception {
    serverOptions = JSONFormatter.fromJSON("{ \"scope\": \"invalid\" }");

    exception.expect(RegionOptionsInvalidException.class);
    exception.expectMessage("Invalid scope: `invalid`.");

    new ScopeOption(serverOptions).setOptionOnRegionFactory(regionFactory);
  }