@Test
@SuppressWarnings("unchecked")
public void testSoftcareGenerationForPaaS() throws Exception {

    String adp = new Scanner(new File(Resources.getResource("softcare/paas/softcare_adp-paas.yml").toURI())).useDelimiter("\\Z").next();
    dam = damGenerator.generateDam(adp);
    template = YamlParser.load(dam);
    testMetadataTemplate(template);
    String expectedDamString = new Scanner(new File(Resources.getResource("softcare/paas/softcare_dam-paas.yml").toURI())).useDelimiter("\\Z").next();
    Map<String, Object> expectedDam = YamlParser.load(expectedDamString);
    assertNotNull(template);
    Map<String, Object> generatedTopologyTemplate = (Map<String, Object>) template.get(DamGenerator.TOPOLOGY_TEMPLATE);
    Map<String, Object> expectedTopologyTemplate = (Map<String, Object>) expectedDam.get(DamGenerator.TOPOLOGY_TEMPLATE);
    Map<String, Object> generatedNodeTemplates = (Map<String, Object>) generatedTopologyTemplate.get(DamGenerator.NODE_TEMPLATES);
    Map<String, Object> expectedNodeTemplates = (Map<String, Object>) expectedTopologyTemplate.get(DamGenerator.NODE_TEMPLATES);
    assertEquals(generatedNodeTemplates.size(), 9);
    assertEquals(generatedNodeTemplates.get("Softcare_dashboard"), expectedNodeTemplates.get("Softcare_dashboard"));
    assertEquals(generatedNodeTemplates.get("Forum"), expectedNodeTemplates.get("Forum"));
    assertEquals(generatedNodeTemplates.get("SoftcareWS"), expectedNodeTemplates.get("SoftcareWS"));
    assertEquals(generatedNodeTemplates.get("ForumDB"), expectedNodeTemplates.get("ForumDB"));
    assertEquals(generatedNodeTemplates.get("modacloudsDc_ForumDB"), expectedNodeTemplates.get("modacloudsDc_ForumDB"));
    assertEquals(generatedNodeTemplates.get("SoftcareDB"), expectedNodeTemplates.get("SoftcareDB"));
    assertEquals(generatedNodeTemplates.get("modacloudsDc_SoftcareDB"), expectedNodeTemplates.get("modacloudsDc_SoftcareDB"));
    assertEquals(generatedNodeTemplates.get("Amazon_EC2_t2_micro_eu_central_1"), expectedNodeTemplates.get("Amazon_EC2_t2_micro_eu_central_1"));
    assertEquals(generatedNodeTemplates.get("Amazon_EC2_t2_micro_ap_northeast_1"), expectedNodeTemplates.get("Amazon_EC2_t2_micro_ap_northeast_1"));
    Map<String, Object> generatedGroups = (Map<String, Object>) generatedTopologyTemplate.get(DamGenerator.GROUPS);
    Map<String, Object> expectedGroups = (Map<String, Object>) expectedTopologyTemplate.get(DamGenerator.GROUPS);
    testSeaCloudsPolicy(generatedGroups);
    testMonitoringConfiguration(generatedGroups);
    testMonitorInitializationPolicy(generatedGroups, ImmutableList.of("Softcare_dashboard", "Forum", "SoftcareWS"));
    assertEquals(generatedGroups.size(), 14);
    assertEquals(generatedGroups.get("operation_ForumDB"), expectedGroups.get("operation_ForumDB"));
    assertEquals(generatedGroups.get("operation_SoftcareDB"), expectedGroups.get("operation_SoftcareDB"));
    assertEquals(generatedGroups.get("operation_Forum"), expectedGroups.get("operation_Forum"));
    assertEquals(generatedGroups.get("operation_SoftcareWS"), expectedGroups.get("operation_SoftcareWS"));
    assertEquals(generatedGroups.get("operation_Softcare_dashboard"), expectedGroups.get("operation_Softcare_dashboard"));
    assertEquals(generatedGroups.get("seaclouds_configuration_policy"), expectedGroups.get("seaclouds_configuration_policy"));
    //locationPolicies
    assertEquals(generatedGroups.get("add_brooklyn_location_Amazon_EC2_t2_micro_eu_central_1"),
            expectedGroups.get("add_brooklyn_location_Amazon_EC2_t2_micro_eu_central_1"));
    assertEquals(generatedGroups.get("add_brooklyn_location_Amazon_EC2_t2_micro_ap_northeast_1"),
            expectedGroups.get("add_brooklyn_location_Amazon_EC2_t2_micro_ap_northeast_1"));
    assertEquals(generatedGroups.get("add_brooklyn_location_Forum"),
            expectedGroups.get("add_brooklyn_location_Forum"));
    assertEquals(generatedGroups.get("add_brooklyn_location_SoftcareWS"),
            expectedGroups.get("add_brooklyn_location_SoftcareWS"));
    assertEquals(generatedGroups.get("add_brooklyn_location_Softcare_dashboard"),
            expectedGroups.get("add_brooklyn_location_Softcare_dashboard"));
}