assertThat( entity, nullValue() );
}
@Test(expected = OptimisticLockException.class)
public void testDeleteADocumentWithWrongRevision() {
Document createdDocument = dataStore.saveDocument( createEntity() );
final String revisionBeforeUpdate = createdDocument.getRevision();
// saving the document will change its revision value
dataStore.saveDocument( createdDocument );
createdDocument.setRevision( revisionBeforeUpdate );
dataStore.deleteDocument( createdDocument.getId(), createdDocument.getRevision() );
}