@Test(expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = ".*Failed to persist Agenda with generated operations.*") public void testNullResponse() { doReturn(null).when(mockResourcePoolAgendaUpdater).update(any(), any()); handler.execute(updateAgendaHandlerInput); }
@Override public String execute(UpdateAgendaHandlerInput handlerInput) { UpdateAgendaHandlerOutput updateAgendaHandlerOutput = new UpdateAgendaHandlerOutput(); updateAgendaHandlerOutput.setOperations(processOperations(handlerInput.getOperations())); updateAgendaHandlerOutput.setParams(handlerInput.getParams()); updatePersistedAgenda(handlerInput); getProgressReporter().reportProgress(getOperationProgressFactory().create(ProcessingState.COMPLETE, CompleteStateMessage.SUCCEEDED.toString())); return new JsonHelper().getJSONString(updateAgendaHandlerOutput); }
UpdateAgendaResidentHandler extends BaseResidentHandler<UpdateAgendaHandlerInput, OperationProgressFactory> { @Override public String execute(UpdateAgendaHandlerInput handlerInput) { UpdateAgendaHandlerOutput updateAgendaHandlerOutput = new UpdateAgendaHandlerOutput(); updateAgendaHandlerOutput.setOperations(processOperations(handlerInput.getOperations())); updateAgendaHandlerOutput.setParams(handlerInput.getParams()); updatePersistedAgenda(handlerInput); getProgressReporter().reportProgress(getOperationProgressFactory().create(ProcessingState.COMPLETE, CompleteStateMessage.SUCCEEDED.toString())); return new JsonHelper().getJSONString(updateAgendaHandlerOutput); } }
UpdateAgendaResidentHandler extends BaseResidentHandler<UpdateAgendaHandlerInput, OperationProgressFactory> { @Override public String execute(UpdateAgendaHandlerInput handlerInput) { UpdateAgendaHandlerOutput updateAgendaHandlerOutput = new UpdateAgendaHandlerOutput(); updateAgendaHandlerOutput.setOperations(processOperations(handlerInput.getOperations())); updateAgendaHandlerOutput.setParams(handlerInput.getParams()); updatePersistedAgenda(handlerInput); getProgressReporter().reportProgress(getOperationProgressFactory().create(ProcessingState.COMPLETE, CompleteStateMessage.SUCCEEDED.toString())); return new JsonHelper().getJSONString(updateAgendaHandlerOutput); } UpdateAgendaResidentHandler(ExecutorContext executorContext); }
UpdateAgendaResidentHandler extends BaseResidentHandler<UpdateAgendaHandlerInput, OperationProgressFactory> { @Override public String execute(UpdateAgendaHandlerInput handlerInput) { UpdateAgendaHandlerOutput updateAgendaHandlerOutput = new UpdateAgendaHandlerOutput(); updateAgendaHandlerOutput.setOperations(processOperations(handlerInput.getOperations())); updateAgendaHandlerOutput.setParams(handlerInput.getParams()); updatePersistedAgenda(handlerInput); getProgressReporter().reportProgress(getOperationProgressFactory().create(ProcessingState.COMPLETE, CompleteStateMessage.SUCCEEDED.toString())); return new JsonHelper().getJSONString(updateAgendaHandlerOutput); } UpdateAgendaResidentHandler(ExecutorContext executorContext); @Override String execute(UpdateAgendaHandlerInput handlerInput); @Override OperationProgressFactory getOperationProgressFactory(); @Override Class<UpdateAgendaHandlerInput> getPayloadClassType(); void setResourcePoolAgendaUpdater(ResourcePoolAgendaUpdater resourcePoolAgendaUpdater); }
UpdateAgendaResidentHandler extends BaseResidentHandler<UpdateAgendaHandlerInput, OperationProgressFactory> { @Override public String execute(UpdateAgendaHandlerInput handlerInput) { UpdateAgendaHandlerOutput updateAgendaHandlerOutput = new UpdateAgendaHandlerOutput(); updateAgendaHandlerOutput.setOperations(processOperations(handlerInput.getOperations())); updateAgendaHandlerOutput.setParams(handlerInput.getParams()); updatePersistedAgenda(handlerInput); getProgressReporter().reportProgress(getOperationProgressFactory().create(ProcessingState.COMPLETE, CompleteStateMessage.SUCCEEDED.toString())); return new JsonHelper().getJSONString(updateAgendaHandlerOutput); } UpdateAgendaResidentHandler(ExecutorContext executorContext); @Override String execute(UpdateAgendaHandlerInput handlerInput); @Override OperationProgressFactory getOperationProgressFactory(); @Override Class<UpdateAgendaHandlerInput> getPayloadClassType(); void setResourcePoolAgendaUpdater(ResourcePoolAgendaUpdater resourcePoolAgendaUpdater);  }