### Question:
FalconExecutionService implements FalconService, EntityStateChangeHandler, NotificationHandler { public void delete(Entity entity) throws FalconException { StateService.get().handleStateChange(entity, EntityState.EVENT.KILL, this); } private  FalconExecutionService(); @Override String getName(); void init(); @Override void destroy(); static FalconExecutionService get(); @Override void onEvent(Event event); @Override PRIORITY getPriority(); @Override void onSubmit(Entity entity); @Override void onSchedule(Entity entity); @Override void onSuspend(Entity entity); @Override void onResume(Entity entity); @Override void onKill(Entity entity); void schedule(Entity entity, Properties properties); void suspend(Entity entity); void resume(Entity entity); void delete(Entity entity); EntityExecutor getEntityExecutor(Entity entity, String cluster); void schedule(Process entity);  }### Answer:
@Test public void testDelete() throws Exception { storeEntity(EntityType.PROCESS, "summarize4"); Process process = getStore().get(EntityType.PROCESS, "summarize4"); Assert.assertNotNull(process); String clusterName = dfsCluster.getCluster().getName(); EntityID processID = new EntityID(process); EntityClusterID executorID = new EntityClusterID(process, clusterName); Assert.assertEquals(stateStore.getEntity(processID).getCurrentState(), EntityState.STATE.SUBMITTED); FalconExecutionService.get().schedule(process); Event event = createEvent(NotificationServicesRegistry.SERVICE.TIME, process, clusterName); FalconExecutionService.get().onEvent(event); event = createEvent(NotificationServicesRegistry.SERVICE.TIME, process, clusterName); FalconExecutionService.get().onEvent(event); event = createEvent(NotificationServicesRegistry.SERVICE.TIME, process, clusterName); FalconExecutionService.get().onEvent(event); Iterator i = stateStore.getAllExecutionInstances(process, clusterName).iterator(); InstanceState instance1 = (InstanceState) i.next(); InstanceState instance2 = (InstanceState) i.next(); InstanceState instance3 = (InstanceState) i.next(); event = createEvent(NotificationServicesRegistry.SERVICE.DATA, instance1.getInstance()); FalconExecutionService.get().onEvent(event); event = createEvent(NotificationServicesRegistry.SERVICE.DATA, instance2.getInstance()); FalconExecutionService.get().onEvent(event); event = createEvent(NotificationServicesRegistry.SERVICE.JOB_SCHEDULE, instance1.getInstance()); FalconExecutionService.get().onEvent(event); instance1 = stateStore.getExecutionInstance(new InstanceID(instance1.getInstance())); instance2 = stateStore.getExecutionInstance(new InstanceID(instance2.getInstance())); instance3 = stateStore.getExecutionInstance(new InstanceID(instance3.getInstance())); Assert.assertEquals(instance1.getCurrentState(), InstanceState.STATE.RUNNING); Assert.assertEquals(instance2.getCurrentState(), InstanceState.STATE.READY); Assert.assertEquals(instance3.getCurrentState(), InstanceState.STATE.WAITING); FalconExecutionService.get().delete(process); Mockito.verify(mockTimeService).unregister(FalconExecutionService.get(), executorID); }