### Question:
Documents { public static String getId(Object document) { return getAccessor(document).getId(document); }  static void registerAccessor(Class<?> documentType, DocumentAccessor accessor); static String getId(Object document); static void setId(Object document, String id); static String getRevision(Object document); static void setRevision(Object document, String rev); static boolean isNew(Object document);  }### Answer:
@Test public void getId_should_return_id() { assertEquals("id_1", Documents.getId(testDoc_1)); }
@Test public void id_in_constructor_should_not_cause_error() { assertEquals("id_4", Documents.getId(constDoc)); }
@Test(expected = InvalidDocumentException.class) public void invalid_doc_should_thow_exception() { Documents.getId(new InvalidDoc()); }
@Test public void annotdated_id_should_return_id() { assertEquals("id_2", Documents.getId(annotatedDoc)); }
@Test public void private_annotdated_id_should_return_id() { assertEquals("id_3", Documents.getId(privAnnotatedDoc)); }
@Test public void should_handle_getId_on_map() { assertEquals(mapDoc.get("_id"), Documents.getId(mapDoc)); }
@Test public void should_handle_getId_on_JsonNode() { assertEquals("jsonNode_id", Documents.getId(nodeDoc)); }