### Question:
ItemVersionManagerImpl implements ItemVersionManager { @Override public ItemVersionRevisions listRevisions(SessionContext context, Id itemId, Id versionId) { validateItemVersionExistence(context, Space.PRIVATE, itemId, versionId); Response<ItemVersionRevisions> response = getCollaborationAdaptor(context).listItemVersionRevisions(context, itemId, versionId); ValidationUtil.validateResponse(response, logger, ErrorCode.ZU_ITEM_VERSION_REVISIONS); return response.getValue(); }  @Override Collection<ItemVersion> list(SessionContext context, Space space, Id itemId); @Override boolean isExist(SessionContext context, Space space, Id itemId, Id versionId); @Override ItemVersion get(SessionContext context, Space space, Id itemId, Id versionId,
                         Id revisionId); @Override Id create(SessionContext context, Id itemId, Id baseVersionId,
                   ItemVersionData data); @Override Id create(SessionContext context, Id itemId, Id versionId, Id baseVersionId, ItemVersionData data); @Override void update(SessionContext context, Id itemId, Id versionId, ItemVersionData data); @Override void delete(SessionContext context, Id itemId, Id versionId); @Override ItemVersionStatus getStatus(SessionContext context, Id itemId, Id versionId); @Override void tag(SessionContext context, Id itemId, Id versionId, Id changeId, Tag tag); @Override void publish(SessionContext context, Id itemId, Id versionId, String message); @Override CoreMergeResult sync(SessionContext context, Id itemId, Id versionId); @Override CoreMergeResult forceSync(SessionContext context, Id itemId, Id versionId); @Override CoreMergeResult merge(SessionContext context, Id itemId, Id versionId,
                               Id sourceVersionId); @Override ItemVersionRevisions listRevisions(SessionContext context, Id itemId, Id versionId); @Override Revision getRevision(SessionContext context, Id itemId, Id versionId, Id revisionId); @Override void resetRevision(SessionContext context, Id itemId,
                            Id versionId, Id revisionId); @Override void revertRevision(SessionContext context, Id itemId,
                             Id versionId, Id revisionId); @Override void updateModificationTime(SessionContext context, Space space, Id itemId,
                                     Id versionId, Date modificationTime); @Override CoreItemVersionConflict getConflict(SessionContext context, Id itemId,
                                             Id versionId); @Override void saveMergeChange(SessionContext context, Space space, Id itemId,
                              ItemVersionChange itemVersionChange);  }### Answer:
@Test public void testListRevision() { Id itemId = new Id(); Id versionId = new Id(); mockExistingVersion(Space.PRIVATE, itemId, versionId); ItemVersionRevisions retrievedRevision = new ItemVersionRevisions(); doReturn(new Response<>(retrievedRevision)).when(collaborationAdaptorMock) .listItemVersionRevisions(context, itemId, versionId); ItemVersionRevisions history = itemVersionManagerImpl.listRevisions(context, itemId, versionId); Assert.assertEquals(history, retrievedRevision); }
@Test(expectedExceptions = ZusammenException.class) public void testListRevisionOnNonExistingItem() { itemVersionManagerImpl.listRevisions(context, new Id(), new Id()); }
@Test(expectedExceptions = ZusammenException.class) public void testListRevisionNonExisting() { Id itemId = new Id(); Id versionId = new Id(); mockNonExistingVersion(Space.PRIVATE, itemId, versionId); itemVersionManagerImpl.listRevisions(context, itemId, versionId); }