public void assertRestartCount(ApplicationId application, HostFilter... filters) {
        for (Node node : nodeRepository.nodes().list(Node.State.active).owner(application)) {
            int expectedRestarts = 0;
            for (HostFilter filter : filters)
                if (NodeHostFilter.from(filter).test(node))
                    expectedRestarts++;
            assertEquals(expectedRestarts, node.allocation().get().restartGeneration().wanted());
        }
    }
Asserts that each active node in this application has a restart count equaling the
number of matches to the given filters
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTester.java