private void simulateReboot(NodeRepository nodeRepository) {
        for (Node node : nodeRepository.nodes().list(Node.State.ready, Node.State.active)) {
            if (node.status().reboot().wanted() > node.status().reboot().current())
                nodeRepository.nodes().write(node.withCurrentRebootGeneration(node.status().reboot().wanted(),
                                                                              nodeRepository.clock().instant()), () -> {});
        }
    }
Set current reboot generation to the wanted reboot generation whenever it is larger (i.e record a reboot)
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/NodeRebooterTest.java