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

    String adp = new Scanner(new File(Resources.getResource("softcare/iaas/softcare_adp-iaas.yml").toURI())).useDelimiter("\\Z").next();
    dam = damGenerator.generateDam(adp);
    template = YamlParser.load(dam);
    testMetadataTemplate(template);
    String expectedDamString = new Scanner(new File(Resources.getResource("softcare/iaas/softcare_dam-iaas.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(), 15);
    assertEquals(generatedNodeTemplates.get("Softcare_dashboard"), expectedNodeTemplates.get("Softcare_dashboard"));
    assertEquals(generatedNodeTemplates.get("modacloudsDc_Softcare_dashboard"), expectedNodeTemplates.get("modacloudsDc_Softcare_dashboard"));
    assertEquals(generatedNodeTemplates.get("Forum"), expectedNodeTemplates.get("Forum"));
    assertEquals(generatedNodeTemplates.get("modacloudsDc_Forum"), expectedNodeTemplates.get("modacloudsDc_Forum"));
    assertEquals(generatedNodeTemplates.get("SoftcareWS"), expectedNodeTemplates.get("SoftcareWS"));
    assertEquals(generatedNodeTemplates.get("modacloudsDc_SoftcareWS"), expectedNodeTemplates.get("modacloudsDc_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_m3_medium_ap_southeast_2"), expectedNodeTemplates.get("Amazon_EC2_m3_medium_ap_southeast_2"));
    assertEquals(generatedNodeTemplates.get("Amazon_EC2_t2_medium_us_east_1"), expectedNodeTemplates.get("Amazon_EC2_t2_medium_us_east_1"));
    assertEquals(generatedNodeTemplates.get("Amazon_EC2_t2_large_us_west_1"), expectedNodeTemplates.get("Amazon_EC2_t2_large_us_west_1"));
    assertEquals(generatedNodeTemplates.get("Amazon_EC2_m3_large_eu_central_1"), expectedNodeTemplates.get("Amazon_EC2_m3_large_eu_central_1"));
    assertEquals(generatedNodeTemplates.get("Amazon_EC2_m4_large_us_west_1"), expectedNodeTemplates.get("Amazon_EC2_m4_large_us_west_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_m3_medium_ap_southeast_2"),
            expectedGroups.get("add_brooklyn_location_Amazon_EC2_m3_medium_ap_southeast_2"));
    assertEquals(generatedGroups.get("add_brooklyn_location_Amazon_EC2_t2_medium_us_east_1"),
            expectedGroups.get("add_brooklyn_location_Amazon_EC2_t2_medium_us_east_1"));
    assertEquals(generatedGroups.get("add_brooklyn_location_Amazon_EC2_t2_large_us_west_1"),
            expectedGroups.get("add_brooklyn_location_Amazon_EC2_t2_large_us_west_1"));
    assertEquals(generatedGroups.get("add_brooklyn_location_Amazon_EC2_m3_large_eu_central_1"),
            expectedGroups.get("add_brooklyn_location_Amazon_EC2_m3_large_eu_central_1"));
    assertEquals(generatedGroups.get("add_brooklyn_location_Amazon_EC2_m4_large_us_west_1"),
            expectedGroups.get("add_brooklyn_location_Amazon_EC2_m4_large_us_west_1"));
}