### Question:
JdbcRevisionManager implements RevisionManager { @Override public <T> RevisionUpdate<T> updateRevision(final RevisionClaim claim, final UpdateRevisionTask<T> task) { LOGGER.debug("Attempting to update revision using {}", claim); final List<Revision> revisionList = new ArrayList<>(claim.getRevisions()); revisionList.sort(new RevisionComparator()); final Set<Revision> incrementedRevisions = new HashSet<>(); for (final Revision incomingRevision : revisionList) { final String entityId = incomingRevision.getEntityId(); getRevision(entityId); updateRevision(incomingRevision); final Revision incrementedRevision = getRevision(entityId); incrementedRevisions.add(incrementedRevision); } LOGGER.debug("Successfully verified Revision Claim for all revisions"); final UpdateResult<T> updateResult = task.update(); LOGGER.debug("Update task completed"); final T updatedEntity = updateResult.getEntity(); final String updaterIdentity = updateResult.updaterIdentity(); final Revision updatedEntityRevision = getRevision(updateResult.getEntityId()); final EntityModification entityModification = new EntityModification(updatedEntityRevision, updaterIdentity); return new StandardRevisionUpdate<>(updatedEntity, entityModification, incrementedRevisions); } JdbcRevisionManager(final JdbcTemplate jdbcTemplate); @Override Revision getRevision(final String entityId); @Override RevisionUpdate<T> updateRevision(final RevisionClaim claim, final UpdateRevisionTask<T> task); @Override T deleteRevision(final RevisionClaim claim, final DeleteRevisionTask<T> task); @Override void reset(final Collection<Revision> revisions); @Override List<Revision> getAllRevisions(); @Override Map<String, Revision> getRevisionMap();  }### Answer:
@Test public void testUpdateRevisionWhenDoesNotExist() { final String entityId = "entity-1"; final String clientId = "client-new"; final Revision revision = new Revision(0L, clientId, entityId); final RevisionClaim revisionClaim = new StandardRevisionClaim(revision); final RevisionUpdate<RevisableEntity> revisionUpdate = revisionManager.updateRevision( revisionClaim, createUpdateTask(entityId)); assertNotNull(revisionUpdate); verifyRevisionUpdate(entityId, revisionUpdate, new Long(1), clientId); }