geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
@Test
  public void testCreateRegionForReplicatedRegionWithParitionResolver() {
    setUpJmxManagerOnVm0ThenConnect(null);
    VM vm = Host.getHost(0).getVM(1);
    // Create a cache in vm 1
    vm.invoke(() -> assertNotNull(getCache()));

    // Create a region with an unrecognized compressor
    CommandStringBuilder commandStringBuilder = new CommandStringBuilder(CliStrings.CREATE_REGION);
    commandStringBuilder.addOption(CliStrings.CREATE_REGION__REGION,
        "testCreateRegionForReplicatedRegionWithParitionResolver");
    commandStringBuilder.addOption(CliStrings.CREATE_REGION__REGIONSHORTCUT, "REPLICATE");
    commandStringBuilder.addOption(CliStrings.CREATE_REGION__PARTITION_RESOLVER, "a.b.c.d");
    CommandResult cmdResult = executeCommand(commandStringBuilder.toString());
    assertEquals(Result.Status.ERROR, cmdResult.getStatus());

    // Assert that our region was not created
    vm.invoke(() -> {
      Region region =
          getCache().getRegion("testCreateRegionForReplicatedRegionWithParitionResolver");
      assertNull(region);
    });
  }
/**
   * Test Description Try creating region of type REPLICATED and specify partition resolver Region
   * Creation should fail.
   */
Test Description Try creating region of type REPLICATED and specify partition resolver Region
Creation should fail.
Test Description Try creating region of type REPLICATED and specify partition resolver Region Creation should fail .
@Test
  public void testCreateRegionForReplicatedRegionWithParitionResolver() {
    setUpJmxManagerOnVm0ThenConnect(null);
    VM vm = Host.getHost(0).getVM(1);
    vm.invoke(() -> assertNotNull(getCache()));
    CommandStringBuilder commandStringBuilder = new CommandStringBuilder(CliStrings.CREATE_REGION);
    commandStringBuilder.addOption(CliStrings.CREATE_REGION__REGION,
        "testCreateRegionForReplicatedRegionWithParitionResolver");
    commandStringBuilder.addOption(CliStrings.CREATE_REGION__REGIONSHORTCUT, "REPLICATE");
    commandStringBuilder.addOption(CliStrings.CREATE_REGION__PARTITION_RESOLVER, "a.b.c.d");
    CommandResult cmdResult = executeCommand(commandStringBuilder.toString());
    assertEquals(Result.Status.ERROR, cmdResult.getStatus());
    vm.invoke(() -> {
      Region region =
          getCache().getRegion("testCreateRegionForReplicatedRegionWithParitionResolver");
      assertNull(region);
    });
  }
@ Test public void testCreateRegionForReplicatedRegionWithParitionResolver ( ) { setUpJmxManagerOnVm0ThenConnect ( null ) ; VM vm = Host . getHost ( 0 ) . getVM ( 1 ) ; vm . invoke ( ( ) -> assertNotNull ( getCache ( ) ) ) ; CommandStringBuilder commandStringBuilder = new CommandStringBuilder ( CliStrings . CREATE_REGION ) ; commandStringBuilder . addOption ( CliStrings . CREATE_REGION__REGION , "testCreateRegionForReplicatedRegionWithParitionResolver" ) ; commandStringBuilder . addOption ( CliStrings . CREATE_REGION__REGIONSHORTCUT , "REPLICATE" ) ; commandStringBuilder . addOption ( CliStrings . CREATE_REGION__PARTITION_RESOLVER , "a.b.c.d" ) ; CommandResult cmdResult = executeCommand ( commandStringBuilder . toString ( ) ) ; assertEquals ( Result . Status . ERROR , cmdResult . getStatus ( ) ) ; vm . invoke ( ( ) -> { Region region = getCache ( ) . getRegion ( "testCreateRegionForReplicatedRegionWithParitionResolver" ) ; assertNull ( region ) ; } ) ; }
Test Description Try creating region of type REPLICATED and specify partition resolver Region
 Creation should fail.
Test Description Try creating region of type REPLICATED and specify partition resolver Region Creation should fail .
// Create a cache in vm 1 // Create a region with an unrecognized compressor // Assert that our region was not created