when(mockStatus.getContainerId()).thenReturn(mockCId);
when(mockStatus.getDiagnostics()).thenReturn(diagnostics);
when(mockStatus.getExitStatus()).thenReturn(ContainerExitStatus.DISKS_FAILED);
schedulerHandler.containerCompleted(mockTask, mockStatus);
Assert.assertEquals(1, mockEventHandler.events.size());
Event event = mockEventHandler.events.get(0);
Assert.assertEquals(AMContainerEventType.C_COMPLETED, event.getType());
AMContainerEventCompleted completedEvent = (AMContainerEventCompleted) event;
Assert.assertEquals(mockCId, completedEvent.getContainerId());
Assert.assertEquals("Container disk failed. NM disk failed.",
completedEvent.getDiagnostics());
Assert.assertFalse(completedEvent.isPreempted());