@Test
  public void lastResultHasRegionInformationForRegion() {
    String regionNameInCacheFromFunctionContext = "MyRegion";
    Cache cacheFromFunctionContext = cacheWithOneRootRegion(regionNameInCacheFromFunctionContext);
    when(functionContext.getCache()).thenReturn(cacheFromFunctionContext);

    getRegionsFunction.execute(functionContext);

    assertThat(lastResultFrom(resultSender).getValue())
        .extracting(RegionInformation::getPath)
        .containsExactly(regionNameInCacheFromFunctionContext);
  }
Characterization unit tests for {@code GetRegionsFunction};
geode-gfsh/src/test/java/org/apache/geode/management/internal/cli/functions/GetRegionsFunctionTest.java