@Override
    public DataNodeDto startNode(String nodeId) throws NodeNotFoundException {
        final DataNodeDto node = nodeService.byNodeId(nodeId);

        if (node.getDataNodeStatus() != DataNodeStatus.UNAVAILABLE && node.getDataNodeStatus() != DataNodeStatus.PREPARED) {
            throw new IllegalArgumentException("Only stopped data nodes can be started.");
        }
        DataNodeLifecycleEvent e = DataNodeLifecycleEvent.create(node.getNodeId(), DataNodeLifecycleTrigger.START);
        clusterEventBus.post(e);
        return node;
    }
@Test
    public void startNodeFailsWhenNodeNotStopped() throws NodeNotFoundException {
        final String testNodeId = "node";
        nodeService.registerServer(buildTestNode(testNodeId, DataNodeStatus.AVAILABLE));
        Exception e = assertThrows(IllegalArgumentException.class, () -> {
            classUnderTest.startNode(testNodeId);
        });
        assertEquals("Only stopped data nodes can be started.", e.getMessage());
        verifyNoMoreInteractions(clusterEventBus);
    }