@Test
public void testWithQuotedParam() {
final HashMap<String, String> params = new HashMap<String, String>();
params.put("foo", "\"bar\"");
final MediaType header = new MediaType("application", "xml", params);
final MediaTypeProvider instance = new MediaTypeProvider();
final String result = instance.toString(header);
final String expResult = "application/xml; foo=\"\\\"bar\\\"\"";
assertEquals(expResult, result);
final MediaType m = instance.fromString(result);
assertEquals("\"bar\"", m.getParameters().get("foo"));
}