InstanceUtils { public static String getInstanceProperty(final Map<String, String> attributes, final String propertyName) { if (attributes == null) { LOGGER.error("getInstanceProperty: no attributes available"); return null; } final String value = attributes.get(propertyName); if (value == null) { LOGGER.error("getInstanceProperty: " + propertyName + " attribute not available"); return null; } return value; }  static String getInstanceProperty(final Map<String, String> attributes,
            final String propertyName); static boolean validateCertRequestSanDnsNames(final Map<String, String> attributes,
                                                         final String domain, final String service, final String dnsSuffix,
                                                         StringBuilder instanceId); static boolean validateCertRequestUriId(final Map<String, String> attributes,
            StringBuilder instanceId);  }
@Test public void testGetInstanceProperty() { assertNull(InstanceUtils.getInstanceProperty(null, "cloudAccount")); HashMap<String, String> attributes = new HashMap<>(); assertNull(InstanceUtils.getInstanceProperty(attributes, "cloudAccount")); attributes.put("testAccount", "1235"); assertNull(InstanceUtils.getInstanceProperty(attributes, "cloudAccount")); attributes.put("cloudAccount", "1235"); assertEquals(InstanceUtils.getInstanceProperty(attributes, "cloudAccount"), "1235"); }