code: @Override
      public Map<String, String> getProperties() {
          Map<String, String> props = new HashMap<String, String>();
  
          SortedSet<Configuration> osgiConfigs = getOSGiConfigurations();
          if (osgiConfigs != null) {//osgiConfigs could be null if not inside an OSGi framework, e.g. unit test
              for (Configuration osgiConfig : osgiConfigs) {
                  // Locate name/value pairs in the config objects and place them in the map.
                  Dictionary<String, Object> dict = osgiConfig.getProperties();
                  Enumeration<String> keys = dict.keys();
  
                  Object myKey = null;
                  Object myValue = null;
                  while (keys.hasMoreElements()) {
                      String key = keys.nextElement();
  
                      if (key.equals("name"))
                          myKey = dict.get(key);
                      if (key.equals("value"))
                          myValue = dict.get(key);
                      if (myKey != null && myValue != null) {
                          props.put(myKey.toString(), myValue.toString());
                      }
                  }
              }
          }
  
          return props;
      }
docs: {@inheritDoc}