@Test
public void shouldReturnErrorOnUpdate() {

    assertThrows(NullPointerException.class, () -> entityManager.update((DocumentEntity) null));
    assertThrows(CouchDBHttpClientException.class, () -> {
        DocumentEntity entity = getEntity();
        entity.remove(CouchDBConstant.ID);
        entityManager.update(entity);
    });
    assertThrows(CouchDBHttpClientException.class, () -> {
        DocumentEntity entity = getEntity();
        entity.add(CouchDBConstant.ID, "not_found");
        entityManager.update(entity);
    });
}