/**
  * Load properties for a given client. It first loads the default values for all properties, and
  * any properties already defined with Archaius ConfigurationManager.
  */
 @Override
 public void loadProperties(String restClientName) {
   enableDynamicProperties = true;
   setClientName(restClientName);
   loadDefaultValues();
   Configuration props = ConfigurationManager.getConfigInstance().subset(restClientName);
   for (Iterator<String> keys = props.getKeys(); keys.hasNext(); ) {
     String key = keys.next();
     String prop = key;
     try {
       if (prop.startsWith(getNameSpace())) {
         prop = prop.substring(getNameSpace().length() + 1);
       }
       setPropertyInternal(prop, getStringValue(props, key));
     } catch (Exception ex) {
       throw new RuntimeException(String.format("Property %s is invalid", prop));
     }
   }
 }