public int hostFlavorCount(String hostFlavor, ApplicationId app) {
        return (int)nodeRepository().nodes().list().owner(app).stream()
                                    .map(n -> nodeRepository().nodes().node(n.parentHostname().get()).get())
                                    .filter(p -> p.flavor().name().equals(hostFlavor))
                                    .count();
    }
Returns the hosts from the input list which are not retired
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTester.java