@Override
    public Optional<DispatchEvent> build(final DataChangedEvent event) {
        String instanceId = ComputeNode.getInstanceIdByComputeNode(event.getKey());
        if (!Strings.isNullOrEmpty(instanceId)) {
            Optional<DispatchEvent> result = createInstanceDispatchEvent(event, instanceId);
            if (result.isPresent()) {
                return result;
            }
        }
        if (event.getKey().startsWith(ComputeNode.getShowProcessListTriggerNodePath())) {
            return createReportLocalProcessesEvent(event);
        }
        if (event.getKey().startsWith(ComputeNode.getKillProcessTriggerNodePath())) {
            return createKillLocalProcessEvent(event);
        }
        return Optional.empty();
    }
@Test
    void assertCreateEventWhenEnabled() {
        Optional<DispatchEvent> actual = new ComputeNodeStateDispatchEventBuilder()
                .build(new DataChangedEvent("/nodes/compute_nodes/status/foo_instance_id", "", Type.UPDATED));
        assertTrue(actual.isPresent());
        assertTrue(((ComputeNodeInstanceStateChangedEvent) actual.get()).getStatus().isEmpty());
        assertThat(((ComputeNodeInstanceStateChangedEvent) actual.get()).getInstanceId(), is("foo_instance_id"));
    }