code: @SuppressWarnings("unchecked")
      private Versioned<String> convertObjectToString(String key, Versioned<Object> value) {
          String valueStr = "";
  
          if(CLUSTER_KEY.equals(key)) {
              valueStr = clusterMapper.writeCluster((Cluster) value.getValue());
          } else if(STORES_KEY.equals(key)) {
              valueStr = storeMapper.writeStoreList((List<StoreDefinition>) value.getValue());
          } else if(REBALANCING_STEAL_INFO.equals(key)) {
              RebalancerState rebalancerState = (RebalancerState) value.getValue();
              valueStr = rebalancerState.toJsonString();
          } else if(SERVER_STATE_KEY.equals(key) || NODE_ID_KEY.equals(key)
                    || SLOP_STREAMING_ENABLED_KEY.equals(key)
                    || PARTITION_STREAMING_ENABLED_KEY.equals(key)
                    || READONLY_FETCH_ENABLED_KEY.equals(key)
                    || QUOTA_ENFORCEMENT_ENABLED_KEY.equals(key)) {
              valueStr = value.getValue().toString();
          } else if(REBALANCING_SOURCE_CLUSTER_XML.equals(key)) {
              if(value.getValue() != null) {
                  valueStr = clusterMapper.writeCluster((Cluster) value.getValue());
              }
          } else if(REBALANCING_SOURCE_STORES_XML.equals(key)) {
              if(value.getValue() != null) {
                  valueStr = storeMapper.writeStoreList((List<StoreDefinition>) value.getValue());
              }
          } else if(this.storeNames.contains(key)) {
              valueStr = "<stores>";
              if(value.getValue() != null) {
                  valueStr += value.getValue();
              }
              valueStr += "</stores>";
          } else {
              throw new VoldemortException("Unhandled key:'" + key
                                           + "' for Object to String serialization.");
          }
  
          return new Versioned<String>(valueStr, value.getVersion());
      }
docs: Converts Object to byte[] depending on the key
  <p>
  StoreRepository takes only StorageEngine<ByteArray,byte[]> and for
  persistence on disk we need to convert them to String.<br>
  
  @param key
  @param value
  @return