Add ApiTest (pulled from latest version in native_api_fix branch - commit 7edd409)
If options are read only, don't create a new db
getCurrentRevisionId should return null instead of blowing up.
Test expects rev.getAttachments() to return empty list rather than null
return empty list rather than blowing up
Fix null pointer exception in ApiTest.testAttachments()
ApiTest.testAttachments() was failing because the Attachment objects were not being replaced by Maps, due to looking up wrong key __attachments vs _attachments.
ApiTest.testAttachments() was failing because it tried to modify an unmodifiable collection.
Expected vs Actual was reversed in assertions
ApiTest.testAttachments() was failing because getDocument() was returning null
Expected vs actual was reversed in the assertion
ApiTest.testCreateNewRevisions() was failing w/ a null pointer exception when calling createRevision.  Fix by doing null checking.
Expected vs actual was reversed in the assertion
ApiTest.testCreateNewRevisions() was getting null for db.  This fixes it.
ApiTest.testCreateNewRevisions() was getting invalid sequence with assertEquals(1, rev1.getSequence()).  This fixes it.
ApiTest.testCreateNewRevisions() was causing null pointer when calling assertNull(rev1.getParentRevisionId());
The test was expecting null instead of empty list.
ApiTest.testCreateNewRevisions() was failing due to incorrect behavior of UnsavedRevision.getId()
ApiTest.testCreateNewRevisions() was causing null pointer exception when calling SavedRevision.getRevisionHistory()
Expected vs actual was reversed in the assertion