Assert.assertTrue(blob.getParameter().containsKey("other"));
Assert.assertEquals("test", blob.getParameter().get("other"));
}
@Test
public void testIllegalFormatedParameter(){
Blob blob = getBlobToTestMimetypeHandling("text/plain;=UTF-8");
Assert.assertEquals("text/plain", blob.getMimeType());
Assert.assertTrue(blob.getParameter().isEmpty());
blob = getBlobToTestMimetypeHandling("text/plain;charset=UTF-8;=illegal");
Assert.assertEquals("text/plain", blob.getMimeType());
Assert.assertEquals(blob.getParameter().size(),1);
Assert.assertTrue(blob.getParameter().containsKey("charset"));
Assert.assertEquals("UTF-8", blob.getParameter().get("charset"));
blob = getBlobToTestMimetypeHandling("text/plain;=illegal;charset=UTF-8");
Assert.assertEquals("text/plain", blob.getMimeType());
Assert.assertEquals(blob.getParameter().size(),1);
Assert.assertTrue(blob.getParameter().containsKey("charset"));
Assert.assertEquals("UTF-8", blob.getParameter().get("charset"));
blob = getBlobToTestMimetypeHandling("text/plain;charset=");
Assert.assertEquals("text/plain", blob.getMimeType());
Assert.assertTrue(blob.getParameter().isEmpty());
blob = getBlobToTestMimetypeHandling("text/plain;charset");
Assert.assertEquals("text/plain", blob.getMimeType());
Assert.assertTrue(blob.getParameter().isEmpty());
blob = getBlobToTestMimetypeHandling("text/plain;charset=UTF-8;test=");
Assert.assertEquals("text/plain", blob.getMimeType());
Assert.assertEquals(blob.getParameter().size(),1);
Assert.assertTrue(blob.getParameter().containsKey("charset"));
Assert.assertEquals("UTF-8", blob.getParameter().get("charset"));
blob = getBlobToTestMimetypeHandling("text/plain;charset=UTF-8;test");
Assert.assertEquals("text/plain", blob.getMimeType());
Assert.assertEquals(blob.getParameter().size(),1);
Assert.assertTrue(blob.getParameter().containsKey("charset"));
Assert.assertEquals("UTF-8", blob.getParameter().get("charset"));
blob = getBlobToTestMimetypeHandling("text/plain;test;charset=UTF-8;");
Assert.assertEquals("text/plain", blob.getMimeType());
Assert.assertEquals(blob.getParameter().size(),1);
Assert.assertTrue(blob.getParameter().containsKey("charset"));
Assert.assertEquals("UTF-8", blob.getParameter().get("charset"));
}