@SuppressWarnings("unchecked")
@Test
public void testRelaunchContainerEvent()
    throws IllegalArgumentException, IllegalAccessException {

  Map<ContainerId, ContainerLaunch> dummyMap =
      (Map<ContainerId, ContainerLaunch>) Whitebox.getInternalState(spy,
          "running");
  when(event.getType())
      .thenReturn(ContainersLauncherEventType.RELAUNCH_CONTAINER);
  assertEquals(0, dummyMap.size());
  spy.handle(event);
  assertEquals(1, dummyMap.size());
  Mockito.verify(containerLauncher, Mockito.times(1))
      .submit(Mockito.any(ContainerRelaunch.class));
  for (ContainerId cid : dummyMap.keySet()) {
    Object o = dummyMap.get(cid);
    assertEquals(true, (o instanceof ContainerRelaunch));
  }
}