@Test public void testFailure() { try { when(mockJMeadowsClient.getBHIENoteImage(any(JMeadowsQuery.class))).thenThrow(new JMeadowsException_Exception("test exception", new JMeadowsException())); } catch (JMeadowsException_Exception e) { fail(e.getMessage()); } try { retrieveDodDocumentService.retrieveDodDocument(queryBuilder.build()).get(); fail("Test should have thrown exception"); } catch (Exception e) { assertTrue(e.getCause() instanceof HystrixRuntimeException); } }
@Override public Future<NoteImage> retrieveDodDocument(JMeadowsQuery jMeadowsQuery) { logger.debug("retrieveDodDocument begin"); return new RetrieveDodDocumentCommand(jMeadowsClient, jMeadowsQuery, this.config.getMaxThreads(), this.config.getTimeoutMS()).queue(); }
RetrieveDodDocumentService implements IRetrieveDodDocumentService { @Override public Future<NoteImage> retrieveDodDocument(JMeadowsQuery jMeadowsQuery) { logger.debug("retrieveDodDocument begin"); return new RetrieveDodDocumentCommand(jMeadowsClient, jMeadowsQuery, this.config.getMaxThreads(), this.config.getTimeoutMS()).queue(); } }
RetrieveDodDocumentService implements IRetrieveDodDocumentService { @Override public Future<NoteImage> retrieveDodDocument(JMeadowsQuery jMeadowsQuery) { logger.debug("retrieveDodDocument begin"); return new RetrieveDodDocumentCommand(jMeadowsClient, jMeadowsQuery, this.config.getMaxThreads(), this.config.getTimeoutMS()).queue(); } @Autowired  RetrieveDodDocumentService(RetrieveDocumentConfiguration config); }
RetrieveDodDocumentService implements IRetrieveDodDocumentService { @Override public Future<NoteImage> retrieveDodDocument(JMeadowsQuery jMeadowsQuery) { logger.debug("retrieveDodDocument begin"); return new RetrieveDodDocumentCommand(jMeadowsClient, jMeadowsQuery, this.config.getMaxThreads(), this.config.getTimeoutMS()).queue(); } @Autowired  RetrieveDodDocumentService(RetrieveDocumentConfiguration config); void setJMeadowsClient(JMeadowsData jMeadowsClient); @Override Future<NoteImage> retrieveDodDocument(JMeadowsQuery jMeadowsQuery); }
RetrieveDodDocumentService implements IRetrieveDodDocumentService { @Override public Future<NoteImage> retrieveDodDocument(JMeadowsQuery jMeadowsQuery) { logger.debug("retrieveDodDocument begin"); return new RetrieveDodDocumentCommand(jMeadowsClient, jMeadowsQuery, this.config.getMaxThreads(), this.config.getTimeoutMS()).queue(); } @Autowired  RetrieveDodDocumentService(RetrieveDocumentConfiguration config); void setJMeadowsClient(JMeadowsData jMeadowsClient); @Override Future<NoteImage> retrieveDodDocument(JMeadowsQuery jMeadowsQuery);  }