@Test public void shouldCreateExcelWithVIARnrItems() throws MalformedURLException { rnr.setStatus(RnrStatus.AUTHORIZED); initRnrItems("ESS_MEDS"); when(rnrMapperForSIMAM.getRnrItemsForSIMAMImport(rnr)).thenReturn(dataList); Workbook workBook = new XSSFWorkbook(); workBook.createSheet(); when(singleListSheetExcelHandler.readXssTemplateFile(anyString(), any(ExcelHandler.PathType.class))).thenReturn(workBook); requisitionEmailServiceForSIMAM.sendRequisitionEmailWithAttachment(rnr, users); assertEquals(SIMAM_PROGRAMS_MAP.get("ESS_MEDS"), dataList.get(0).get("program_code")); }
public void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users) { if (!requisition.getStatus().equals(RnrStatus.AUTHORIZED) || users.size() <= 0) { return; } insertEmailMessages(requisition, users); }
RequisitionEmailServiceForSIMAM { public void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users) { if (!requisition.getStatus().equals(RnrStatus.AUTHORIZED) || users.size() <= 0) { return; } insertEmailMessages(requisition, users); } }
RequisitionEmailServiceForSIMAM { public void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users) { if (!requisition.getStatus().equals(RnrStatus.AUTHORIZED) || users.size() <= 0) { return; } insertEmailMessages(requisition, users); }  }
RequisitionEmailServiceForSIMAM { public void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users) { if (!requisition.getStatus().equals(RnrStatus.AUTHORIZED) || users.size() <= 0) { return; } insertEmailMessages(requisition, users); }  void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users); EmailAttachment generateRequisitionExcelForSIMAM(Rnr requisition); }
RequisitionEmailServiceForSIMAM { public void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users) { if (!requisition.getStatus().equals(RnrStatus.AUTHORIZED) || users.size() <= 0) { return; } insertEmailMessages(requisition, users); }  void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users); EmailAttachment generateRequisitionExcelForSIMAM(Rnr requisition); static final String TEMPLATE_IMPORT_RNR_XLSX; static final String TEMPLATE_IMPORT_REGIMEN_XLSX; static final String TEMPLATE_IMPORT_REGIMEN_XLSX_EMPTY; static final String FILE_APPLICATION_VND_MS_EXCEL; static final String REGIMEN_FILE_NAME_PREFIX; static final String REQUI_FILE_NAME_PREFIX; static final String EMAIL_TEMPLATE_FOR_REQUISITION_ATTACHMENT_PREFIX; static final Map<String, String> SIMAM_PROGRAMS_MAP; }