@Test
public void testNullEntityToString() throws Exception {

    try {
        EntityUtils.toString(null);
        Assert.fail("NullPointerException should have been thrown");
    } catch (final NullPointerException ex) {
        // expected
    }
}