### Question:
ItemVersionManagerImpl implements ItemVersionManager { @Override public ItemVersion get(SessionContext context, Space space, Id itemId, Id versionId, Id revisionId) { validateItemExistence(context, itemId); Response<ItemVersion> response; if (revisionId == null) { response = getStateAdaptor(context).getItemVersion(context, space, itemId, versionId); } else { response = getCollaborationAdaptor(context) .getItemVersion(context, space, itemId, versionId, revisionId); } ValidationUtil.validateResponse(response, logger, ErrorCode.ZU_ITEM_VERSION_GET); 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 testGet() { Id itemId = new Id(); doReturn(true).when(itemManagerMock).isExist(context, itemId); Id versionId = new Id(); ItemVersion retrievedVersion = TestUtils.createItemVersion(versionId, new Id(), "v1"); doReturn(new Response<>(retrievedVersion)).when(stateAdaptorMock) .getItemVersion(context, Space.PRIVATE, itemId, retrievedVersion.getId()); ItemVersion version = itemVersionManagerImpl.get(context, Space.PRIVATE, itemId, versionId,null); Assert.assertEquals(version, retrievedVersion); }
@Test(expectedExceptions = ZusammenException.class) public void testGetOnNonExistingItem() { itemVersionManagerImpl.get(context, Space.PRIVATE, new Id(), new Id(),null); }