assertEquals("ERROR", entry.get("level"));
assertEquals("Error entry", entry.get("message"));
// verify throwable presence and content
assertTrue("Throwable is not present in logged entry", entry.containsField("throwables"));
BasicDBList throwables = (BasicDBList)entry.get("throwables");
assertEquals(2, throwables.size());
DBObject rootEntry = (DBObject)throwables.get("0");
assertTrue("Throwable message is not present in logged entry", rootEntry.containsField("message"));
assertEquals("I'm an innocent bystander.", rootEntry.get("message"));
DBObject chainedEntry = (DBObject)throwables.get("1");
assertTrue("Throwable message is not present in logged entry", chainedEntry.containsField("message"));
assertEquals("I'm the real culprit!", chainedEntry.get("message"));
}