class AllocationUtils {

    public static List<TPolicyTemplate> getPolicyTemplates(TNodeTemplate nodeTemplate) {
        List<TPolicyTemplate> policyTemplates = new ArrayList<>();

        if (nodeTemplate.getPolicies() != null) {
            List<TPolicy> tPolicies = nodeTemplate.getPolicies().getPolicy();
            for (TPolicy tPolicy : tPolicies) {
                policyTemplates.add(toPolicyTemplate(tPolicy));
            }
        }
        return policyTemplates;
    }

}