@DELETE
    @Path("{nodeId}")
    @ApiOperation("Remove node from cluster")
    @AuditEvent(type = DATANODE_REMOVE)
    @RequiresPermissions(RestPermissions.DATANODE_REMOVE)
    public DataNodeDto removeNode(@ApiParam(name = "nodeId", required = true) @PathParam("nodeId") String nodeId,
                                  @Context UserContext userContext) {
        try {
            return dataNodeCommandService.removeNode(nodeId);
        } catch (NodeNotFoundException e) {
            throw new NotFoundException("Node " + nodeId + " not found");
        }
    }
@Test
    public void removeUnavailableNode_throwsNotFoundException() throws NodeNotFoundException {
        doThrow(NodeNotFoundException.class).when(dataNodeCommandService).removeNode(NODEID);
        Exception e = assertThrows(NotFoundException.class, () -> classUnderTest.removeNode(NODEID, userContext));
        assertEquals("Node " + NODEID + " not found", e.getMessage());
    }