@Test(dataProvider = "retrieveAgendaProgressErrorProvider") public void testRetrieveAgendaProgressNull(DataObjectResponse<AgendaProgress> response) { doReturn(response).when(mockAgendaProgressClient).getObject(any()); Assert.assertNull(consumer.retrieveAgendaProgress("id")); }
protected AgendaProgress retrieveAgendaProgress(String agendaProgressId) { try { DataObjectResponse<AgendaProgress> response = agendaProgressClient.getObject(agendaProgressId); if(!response.isError()) { if(response.getAll()!= null && response.getAll().size() > 0) return response.getFirst(); else logger.error("AgendaProgress no longer exists: {} {} ", agendaProgressId, response.getErrorResponse()); } logger.error("Failed to retrieve AgendaProgress: {} {} ", agendaProgressId, response.getErrorResponse()); } catch (Exception e) { logger.error(String.format("Failed to retrieve AgendaProgress: %1$s", agendaProgressId), e); } return null; }
AgendaProgressTimeoutConsumer implements Consumer<String> { protected AgendaProgress retrieveAgendaProgress(String agendaProgressId) { try { DataObjectResponse<AgendaProgress> response = agendaProgressClient.getObject(agendaProgressId); if(!response.isError()) { if(response.getAll()!= null && response.getAll().size() > 0) return response.getFirst(); else logger.error("AgendaProgress no longer exists: {} {} ", agendaProgressId, response.getErrorResponse()); } logger.error("Failed to retrieve AgendaProgress: {} {} ", agendaProgressId, response.getErrorResponse()); } catch (Exception e) { logger.error(String.format("Failed to retrieve AgendaProgress: %1$s", agendaProgressId), e); } return null; } }
AgendaProgressTimeoutConsumer implements Consumer<String> { protected AgendaProgress retrieveAgendaProgress(String agendaProgressId) { try { DataObjectResponse<AgendaProgress> response = agendaProgressClient.getObject(agendaProgressId); if(!response.isError()) { if(response.getAll()!= null && response.getAll().size() > 0) return response.getFirst(); else logger.error("AgendaProgress no longer exists: {} {} ", agendaProgressId, response.getErrorResponse()); } logger.error("Failed to retrieve AgendaProgress: {} {} ", agendaProgressId, response.getErrorResponse()); } catch (Exception e) { logger.error(String.format("Failed to retrieve AgendaProgress: %1$s", agendaProgressId), e); } return null; } AgendaProgressTimeoutConsumer(HttpObjectClient<AgendaProgress> agendaProgressClient); }
AgendaProgressTimeoutConsumer implements Consumer<String> { protected AgendaProgress retrieveAgendaProgress(String agendaProgressId) { try { DataObjectResponse<AgendaProgress> response = agendaProgressClient.getObject(agendaProgressId); if(!response.isError()) { if(response.getAll()!= null && response.getAll().size() > 0) return response.getFirst(); else logger.error("AgendaProgress no longer exists: {} {} ", agendaProgressId, response.getErrorResponse()); } logger.error("Failed to retrieve AgendaProgress: {} {} ", agendaProgressId, response.getErrorResponse()); } catch (Exception e) { logger.error(String.format("Failed to retrieve AgendaProgress: %1$s", agendaProgressId), e); } return null; } AgendaProgressTimeoutConsumer(HttpObjectClient<AgendaProgress> agendaProgressClient); @Override ConsumerResult<String> consume(Collection<String> collection, Instant endProcessingInstant); boolean getLogReclaimOnly(); AgendaProgressTimeoutConsumer setLogReclaimOnly(boolean logReclaimOnly); }
AgendaProgressTimeoutConsumer implements Consumer<String> { protected AgendaProgress retrieveAgendaProgress(String agendaProgressId) { try { DataObjectResponse<AgendaProgress> response = agendaProgressClient.getObject(agendaProgressId); if(!response.isError()) { if(response.getAll()!= null && response.getAll().size() > 0) return response.getFirst(); else logger.error("AgendaProgress no longer exists: {} {} ", agendaProgressId, response.getErrorResponse()); } logger.error("Failed to retrieve AgendaProgress: {} {} ", agendaProgressId, response.getErrorResponse()); } catch (Exception e) { logger.error(String.format("Failed to retrieve AgendaProgress: %1$s", agendaProgressId), e); } return null; } AgendaProgressTimeoutConsumer(HttpObjectClient<AgendaProgress> agendaProgressClient); @Override ConsumerResult<String> consume(Collection<String> collection, Instant endProcessingInstant); boolean getLogReclaimOnly(); AgendaProgressTimeoutConsumer setLogReclaimOnly(boolean logReclaimOnly);  }