private Node node(String hostname, Flavor flavor, Optional<String> parent, Optional<String> tenant) {
        Node.Builder builder = Node.create("fake", hostname, flavor,
                parent.isPresent() ? Node.State.ready : Node.State.active,
                parent.isPresent() ? NodeType.tenant : NodeType.host)
                .ipConfig(IP.Config.of(List.of("127.0.0.1"), parent.isPresent() ? List.of() : getAdditionalIP(), List.of()));
        parent.ifPresent(builder::parentHostname);
        allocation(tenant, flavor).ifPresent(builder::allocation);

        return builder.build();
    }
Graphically run allocation procedure to ease manual comprehension.

Extremely useful when trying to understand test cases and build corner cases.
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/AllocationSimulator.java