@Test
  public void lastResultIsNullWhenThereAreNoRegions() {
    Cache cacheFromFunctionContext = mock(Cache.class);
    when(cacheFromFunctionContext.rootRegions()).thenReturn(Collections.emptySet());
    when(functionContext.getCache()).thenReturn(cacheFromFunctionContext);

    getRegionsFunction.execute(functionContext);

    verify(resultSender).lastResult(isNull());
  }
Characterization unit tests for {@code GetRegionsFunction};
geode-gfsh/src/test/java/org/apache/geode/management/internal/cli/functions/GetRegionsFunctionTest.java