@Test
  public void testOpenedEntityGroupHandlerOnMasterRestart() throws Exception {
    // Start the cluster
    log("Starting cluster");
    TEST_UTIL.getConfiguration().setInt("wasp.master.assignment.timeoutmonitor.period", 2000);
    TEST_UTIL.getConfiguration().setInt("wasp.master.assignment.timeoutmonitor.timeout", 5000);
    TEST_UTIL.startMiniCluster(NUM_MASTERS, NUM_FServer);
    String tableName = "testOpenedEntityGroupHandlerOnMasterRestart";
    MiniWaspCluster cluster = createEntityGroups(tableName);
    abortMaster(cluster);

    FServer entityGroupServer = cluster.getFServer(0);
    EntityGroup entityGroup = getEntityGroupBeingServed(cluster, entityGroupServer);

    // forcefully move a entityGroup to OPENED state in zk
    // Create a ZKW to use in the test
    zkw =
        WaspTestingUtility.createAndForceNodeToOpenedState(
            TEST_UTIL, entityGroup, entityGroupServer.getServerName());

    // Start up a new master
    log("Starting up a new master");
    cluster.startMaster().getMaster();
    log("Waiting for master to be ready");
    cluster.waitForActiveAndReadyMaster();
    log("Master is ready");

    // Failover should be completed, now wait for no RIT
    log("Waiting for no more RIT");
    ZKAssign.blockUntilNoRIT(zkw);
  }
 @BeforeClass
 public static void setUpBeforeClass() throws Exception {
   TEST_UTIL.getConfiguration().setClass(FConstants.REDO_IMPL, MemRedoLog.class, Redo.class);
   TEST_UTIL.startMiniCluster(3);
   admin = TEST_UTIL.getWaspAdmin();
 }