public static ByteString dataMapToByteString(Map<String, String> headers, DataMap dataMap) throws MimeTypeParseException, IOException
  {
    return ByteString.unsafeWrap(getContentType(headers).getCodec().mapToBytes(dataMap));
  }
@Test(expectedExceptions = MimeTypeParseException.class)
  public void testDataMapToByteStringWithNonParsableContentType() throws MimeTypeParseException, IOException
  {
    DataMap dataMap = createTestDataMap();
    DataMapConverter.dataMapToByteString(
        Collections.singletonMap(RestConstants.HEADER_CONTENT_TYPE, "application::json"), dataMap);
  }