@Test
    public void testFilterOfferings() throws  Exception {

        ToscaParser parser = new ToscaParserSupplier().get();
        assertNotNull(parser);
        ParsingResult<ArchiveRoot> aamResult = parser.parseFile(Paths.get(Resources.getResource("aams/offeringsfilteraam.yml").toURI()));

        assertNotNull(aamResult);
        ParsingResult<ArchiveRoot> offeringResult = parser.parseFile(Paths.get(Resources.getResource("global.yaml").toURI()));
        Map<String, Pair<NodeTemplate, String>> offeringsToMatch = new HashMap<>();
        Map<String, NodeTemplate> offeringsNt =  offeringResult.getResult().getTopology().getNodeTemplates();
        for(String ntn : offeringsNt.keySet()){
            offeringsToMatch.put(ntn, new Pair<NodeTemplate, String>(offeringsNt.get(ntn), ntn));
        }

        Matchmaker mm = new Matchmaker();
        Map<String, HashSet<String>> res  = mm.match(aamResult, offeringsToMatch);
        assertNotNull(res);

        for(String moduleName : res.keySet()){
            for(String of : res.get(moduleName)){
                NodeTemplate nt = offeringsNt.get(of);
                AbstractPropertyValue offeringProperty = nt.getProperties().get("num_cpus");
                String spv = ((ScalarPropertyValue) offeringProperty).getValue();
                assertTrue(new Integer("2").compareTo(new Integer(spv)) >= 0); ;
            }
        }

        ParsingResult<ArchiveRoot> aamResult2 = parser.parseFile(Paths.get(Resources.getResource("aams/offeringsfilteraam2.yml").toURI()));
        assertNotNull(aamResult2);

        res  = mm.match(aamResult2, offeringsToMatch);
        assertNotNull(res);
        for(String moduleName : res.keySet()){
            for(String of : res.get(moduleName)){
                NodeTemplate nt = offeringsNt.get(of);
                AbstractPropertyValue offeringProperty = nt.getProperties().get("num_cpus");
                String spv = ((ScalarPropertyValue) offeringProperty).getValue();
                assertTrue(new Integer("2").compareTo(new Integer(spv)) > 0); ;
            }
        }

        ParsingResult<ArchiveRoot> aamResult3 = parser.parseFile(Paths.get(Resources.getResource("aams/offeringsfilteraam3.yml").toURI()));
        assertNotNull(aamResult3);

        res  = mm.match(aamResult3, offeringsToMatch);
        assertNotNull(res);
        for(String moduleName : res.keySet()){
            for(String of : res.get(moduleName)){
                NodeTemplate nt = offeringsNt.get(of);
                AbstractPropertyValue offeringProperty = nt.getProperties().get("num_cpus");
                String spv = ((ScalarPropertyValue) offeringProperty).getValue();
                assertTrue(new Integer("2").compareTo(new Integer(spv)) == 0); ;
            }
        }


}