@Test
public void testNull() {

    StringWriter writer = new StringWriter();
    boolean ex = false;
    try {
        JsonMetadata.toJson(null, writer);
    } catch (TikaException e) {
        ex = true;
    }
    assertFalse(ex);
    assertEquals("null", writer.toString());        
}