SeaCloudsApplicationData implements Serializable { static Set<String> extractMonitoringRulesIds(Map toscaDamMap) throws JAXBException { Set<String> returnSet = new HashSet<>(); Map topologyTemplate = (Map) toscaDamMap.get(YAML_TOPOLOGY_TEMPLATE_TAG); Map groups = (Map) topologyTemplate.get(YAML_GROUPS_TEMPLATE_TAG); Map seaCloudsConfigurationMember = (Map) groups.get(YAML_SEACLOUDS_POLICY_TAG); Map seaCloudsConfigurationPolicy = (Map) ((Map)((List) seaCloudsConfigurationMember.get(YAML_POLICIES_TAG)).get(0)).get(YAML_SEACLOUDS_POLICY_CONFIGURATION_TAG); String rulesB64String = (String) seaCloudsConfigurationPolicy.get(YAML_SEACLOUDS_RULES_TAG); String rulesString = new String(BaseEncoding.base64().decode(rulesB64String)); MonitoringRules rules = ObjectMapperHelpers.XmlToObject(rulesString, MonitoringRules.class); for(MonitoringRule rule : rules.getMonitoringRules()){ returnSet.add(rule.getId()); } return returnSet; } SeaCloudsApplicationData(String toscaDam);   SeaCloudsApplicationData(Map toscaDamMap); void setDeployerApplicationId(ApplicationSummary application); void setDeployerApplicationId(TaskSummary applicationTask); void setMonitoringRulesIds(MonitoringRules monitoringRules); void setAgreementId(Agreement agreement); @JsonProperty String getSeaCloudsApplicationId(); @JsonProperty String getName(); @JsonProperty Set<String> getMonitoringRulesIds(); @JsonProperty String getAgreementId(); @JsonProperty String getToscaDam(); @JsonProperty String getDeployerApplicationId(); @JsonProperty Status getDeploymentStatus(); @JsonProperty IGuaranteeTerm.GuaranteeTermStatusEnum getAgreementStatus(); void setAgreementStatus(IGuaranteeTerm.GuaranteeTermStatusEnum agreementStatus); void setDeploymentStatus(Status deploymentStatus); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testExtractMonitoringRulesIds() throws Exception { assertEquals(SeaCloudsApplicationData.extractMonitoringRulesIds(toscaDamMap), MONITORING_RULES_IDS); }