assertEquals(ExecutionState.SCHEDULED, vertex.getExecutionState());
// task manager mock
TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
when(taskManager.submitTask(Matchers.any(TaskDeploymentDescriptor.class))).thenReturn(new TaskOperationResult(execId, true));
when(taskManager.cancelTask(execId)).thenReturn(new TaskOperationResult(execId, true), new TaskOperationResult(execId, false));
Instance instance = getInstance(taskManager);
AllocatedSlot slot = instance.allocateSlot(new JobID());
vertex.deployToSlot(slot);