class FulfillPolicies extends CriteriaCached {

    @Override
    public List<TopologyWrapper> filter(List<TopologyWrapper> topologies) {
        // clone to avoid altering input topologies
        List<TopologyWrapper> cloned = topologies.stream().map(t ->
            new TopologyWrapper(AllocationUtils.deepcopy(t.getTopology()))).collect(Collectors.toList());
        // all generated topologies have the same policies for top level nts -> get policies from any of them
        Map<TNodeTemplate, List<PolicyWrapper>> policiesForNTs = getPoliciesForNTs(cloned.get(0), params);
        return new PoliciesFilter(cloned, policiesForNTs).filter();
    }

    public  FulfillPolicies(JsonNode params, int outputCap);

}