private int getNodeId() {
        int nodeId = getNodeId(System.nanoTime());
        assert nodeId > 0 || nodeId == NODE_ID_OUT_OF_RANGE : "getNodeId() returned invalid value: " + nodeId;
        return nodeId;
    }
@Test
    public void when_nodeIdUpdated_then_pickedUpAfterUpdateInterval() {
        when(clusterService.getMemberListJoinVersion()).thenReturn(20);
        assertEquals(20, gen.getNodeId(0));

        when(clusterService.getMemberListJoinVersion()).thenReturn(30);
        assertEquals(20, gen.getNodeId(0));
        assertEquals(20, gen.getNodeId(NODE_ID_UPDATE_INTERVAL_NS - 1));
        assertEquals(30, gen.getNodeId(NODE_ID_UPDATE_INTERVAL_NS));
    }