DodDocumentService implements IDodDocumentService { @Override public Future<Document> convertAndStoreCDADocument(String cdaNote, PatientIds patientIds, String eventId, Document vprDocument) { logger.debug("convertAndStoreCDADocument begin"); return createCdaDocumentCommandInstance(cdaNote, patientIds, eventId, vprDocument).queue(); }  @Autowired void setDodDocumentConfiguration(DodDocumentConfiguration dodDocumentConfiguration); @Override Future<Document> convertAndStoreCDADocument(String cdaNote, PatientIds patientIds, String eventId, Document vprDocument); @Override Future<Document> retrieveConvertAndStoreRTFDocument(String complexNoteUrl, PatientIds patientIds,
                                                               String eventId, Document vprDocument); @Override Boolean deleteDodDocuments(String pid);  }
@Test public void testConvertAndStoreCDADocument() { Future<Document> docFuture = testDodDocumentService.convertAndStoreCDADocument(CDA_NOTE, patientIds, "event.id", vprDocument); try { Document resultVprDocument = docFuture.get(); assertNotNull(resultVprDocument); assertThat(resultVprDocument.getUid(), is(VPR_DOC_UID)); assertNotNull(resultVprDocument.getText()); assertThat(resultVprDocument.getText().get(0).getContent(), is(NOTE_PLAIN_TEXT)); assertThat(resultVprDocument.getDodComplexNoteUri(), is(String.format("%s/%s/%s.html", STORAGE_SERVICE_PATH, pid2HexString("test.pid"), FILENAME))); } catch (InterruptedException | ExecutionException e) { fail(e.getMessage()); } }