@Test
public void testIsEncoded () throws Exception {

    final StringEntity entity = new StringEntity("...", null);
    entity.setContentType(URLEncodedUtils.CONTENT_TYPE);
    Assert.assertTrue(URLEncodedUtils.isEncoded(entity));
    entity.setContentType(URLEncodedUtils.CONTENT_TYPE + "; charset=US-ASCII");
    Assert.assertTrue(URLEncodedUtils.isEncoded(entity));
    entity.setContentType("text/test");
    Assert.assertFalse(URLEncodedUtils.isEncoded(entity));
}