public static DataMap bytesToDataMap(Map<String, String> headers, ByteString bytes) throws MimeTypeParseException, IOException
  {
    return getContentType(headers).getCodec().readMap(bytes);
  }
@Test
  public void testPSONByteStringToDataMap() throws MimeTypeParseException, IOException
  {
    DataMap expectedDataMap = createTestDataMap();
    ByteString byteString = ByteString.copy(PSON_DATA_CODEC.mapToBytes(expectedDataMap));
    DataMap dataMap = bytesToDataMap("application/x-pson", byteString);
    Assert.assertEquals(dataMap, expectedDataMap);

    Map<String, String> headers = Collections.singletonMap(RestConstants.HEADER_CONTENT_TYPE, "application/x-pson");
    dataMap = DataMapConverter.bytesToDataMap(headers, byteString);
    Assert.assertEquals(dataMap, expectedDataMap);
  }