protected void doCreateEntry(String name) {
    LogWriter log = org.apache.geode.test.dunit.LogWriterUtils.getLogWriter();
    log.info("<ExpectedException action=add>" + "dunit.RMIException" + "</ExpectedException>");

    Object[] args = new Object[] {name,};
    Host host = Host.getHost(0);
    VM vm = host.getVM(0);
    try {
      vm.invoke(getClass(), "createEntry", args);
    } catch (RMIException e) {
      // expected
    }

    log.info("<ExpectedException action=add>" + "dunit.RMIException" + "</ExpectedException>");
  }
Set a listener that generates some sort of error

@param which makes it test dependent
@return the listener
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/SystemFailureDUnitTest.java