### Question:
MsoYamlEditorWithEnvt { @SuppressWarnings("unchecked") public synchronized Set<MsoHeatEnvironmentParameter> getParameterListFromEnvt() { Set<MsoHeatEnvironmentParameter> paramSet = new HashSet<>(); Map<String, Object> resourceMap = null; try { resourceMap = (Map<String, Object>) yml.get("parameters"); } catch (Exception e) { logger.debug(EXCEPTION, e); return paramSet; } if (resourceMap == null) { return paramSet; } for (Entry<String, Object> stringObjectEntry : resourceMap.entrySet()) { MsoHeatEnvironmentParameter hep = new MsoHeatEnvironmentParameter(); Entry<String, Object> pair = stringObjectEntry; String value; Object obj = pair.getValue(); if (obj instanceof String) { value = yaml.dump(obj); value = value.substring(0, value.length() - 1); } else if (obj instanceof LinkedHashMap) { try { value = JSON_MAPPER.writeValueAsString(obj); } catch (Exception e) { logger.debug(EXCEPTION, e); value = "_BAD_JSON_MAPPING"; } } else { value = String.valueOf(obj); } hep.setName((String) pair.getKey()); hep.setValue(value); paramSet.add(hep); } return paramSet; } MsoYamlEditorWithEnvt();  MsoYamlEditorWithEnvt(byte[] b); @SuppressWarnings("unchecked") synchronized Set<MsoHeatEnvironmentParameter> getParameterListFromEnvt(); synchronized Set<MsoHeatEnvironmentResource> getResourceListFromEnvt(); synchronized Set<HeatTemplateParam> getParameterList(); static final String EXCEPTION; }### Answer:
@Test public void getParameterListFromEnvtTest() throws JsonParseException, JsonMappingException, IOException { yaml = new MsoYamlEditorWithEnvt(RAW_ENTRY_WITH_NO_RESOURCE_REGISTRY.getBytes()); HeatTemplateParam expectedHeatParam = mapper.readValue(new File(RESOURCE_PATH + "HeatTemplateParamExpected.json"), HeatTemplateParam.class); Set<HeatTemplateParam> heatParamSet = yaml.getParameterList(); for (HeatTemplateParam heatParam : heatParamSet) { assertThat(heatParam, sameBeanAs(expectedHeatParam)); } }