@Test public void shouldDisplayErrorIfFileIsBlankWithOnlyHeader() throws Exception { configuration.setHeaderInFile(true); when(listReader.read()).thenReturn(null); when(listReader.getRowNumber()).thenReturn(1); budgetFileProcessor.process(message); verify(messageService).message("error.facility.code.invalid"); }
public void process(Message message) throws Exception { File budgetFile = (File) message.getPayload(); logger.debug("processing Budget File " + budgetFile.getName()); BudgetFileInfo budgetFileInfo = saveBudgetFile(budgetFile, false); Boolean processingError = getSpringProxy().processBudgetFile(budgetFile, budgetFileInfo); budgetFileInfo.setProcessingError(processingError); budgetFilePostProcessHandler.process(budgetFileInfo, budgetFile); }
BudgetFileProcessor { public void process(Message message) throws Exception { File budgetFile = (File) message.getPayload(); logger.debug("processing Budget File " + budgetFile.getName()); BudgetFileInfo budgetFileInfo = saveBudgetFile(budgetFile, false); Boolean processingError = getSpringProxy().processBudgetFile(budgetFile, budgetFileInfo); budgetFileInfo.setProcessingError(processingError); budgetFilePostProcessHandler.process(budgetFileInfo, budgetFile); } }
BudgetFileProcessor { public void process(Message message) throws Exception { File budgetFile = (File) message.getPayload(); logger.debug("processing Budget File " + budgetFile.getName()); BudgetFileInfo budgetFileInfo = saveBudgetFile(budgetFile, false); Boolean processingError = getSpringProxy().processBudgetFile(budgetFile, budgetFileInfo); budgetFileInfo.setProcessingError(processingError); budgetFilePostProcessHandler.process(budgetFileInfo, budgetFile); }  }
BudgetFileProcessor { public void process(Message message) throws Exception { File budgetFile = (File) message.getPayload(); logger.debug("processing Budget File " + budgetFile.getName()); BudgetFileInfo budgetFileInfo = saveBudgetFile(budgetFile, false); Boolean processingError = getSpringProxy().processBudgetFile(budgetFile, budgetFileInfo); budgetFileInfo.setProcessingError(processingError); budgetFilePostProcessHandler.process(budgetFileInfo, budgetFile); }  void process(Message message); @Transactional Boolean processBudgetFile(File budgetFile, BudgetFileInfo budgetFileInfo); }
BudgetFileProcessor { public void process(Message message) throws Exception { File budgetFile = (File) message.getPayload(); logger.debug("processing Budget File " + budgetFile.getName()); BudgetFileInfo budgetFileInfo = saveBudgetFile(budgetFile, false); Boolean processingError = getSpringProxy().processBudgetFile(budgetFile, budgetFileInfo); budgetFileInfo.setProcessingError(processingError); budgetFilePostProcessHandler.process(budgetFileInfo, budgetFile); }  void process(Message message); @Transactional Boolean processBudgetFile(File budgetFile, BudgetFileInfo budgetFileInfo);  }