@Test
  public void testInvokeRunnableWithException() {
    Host host = Host.getHost(0);
    VM vm = host.getVM(0);
    try {
      vm.invoke(new InvokeRunnable());
      fail("Should have thrown a BasicTestException");
    } catch (RMIException ex) {
      assertTrue(ex.getCause() instanceof BasicTestException);
    }
  }
This class tests the functionality of the {@link VM} class.
geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/tests/VMDistributedTest.java