### Question:
ArchivedCaseDocumentDatastore extends CommonDatastore<ArchivedCaseDocumentItem, ArchivedDocument> implements DatastoreHasGet<CaseDocumentItem>,
        DatastoreHasDelete { @Override public ArchivedCaseDocumentItem get(final APIID id) { try { final ArchivedDocument documentItem = processAPI.getArchivedProcessDocument(id.toLong()); return convertEngineToConsoleItem(documentItem); } catch (final Exception e) { throw new APIException(e); } } ArchivedCaseDocumentDatastore(final APISession engineSession, final WebBonitaConstantsUtils constantsValue, final ProcessAPI processAPI); @Override ArchivedCaseDocumentItem get(final APIID id); ItemSearchResult<ArchivedCaseDocumentItem> search(final int page, final int resultsByPage,
            final String search, final Map<String, String> filters, final String orders); @Override void delete(final List<APIID> ids);  }### Answer:
@Test public void it_should_call_engine_processAPI_getDocument() throws Exception { final APIID id = APIID.makeAPIID(1l); documentDatastore.get(id); verify(processAPI).getArchivedProcessDocument(id.toLong()); }
@Test(expected = APIException.class) public void it_should_catch_and_throw_APIException_for_not_find_document() throws Exception { final APIID id = APIID.makeAPIID(1l); when(processAPI.getArchivedProcessDocument(id.toLong())).thenThrow(new ArchivedDocumentNotFoundException(new Exception())); documentDatastore.get(id); }