@Test public void testDecodeAttachedFileNameWithSpaces() throws Exception { final String fileName = "file Name"; final String message = serviceSpy.decodeAttachedFileNames(fileName); assertEquals("file Name", message); }
protected String decodeAttachedFileNames(String attachedFileNames) throws Exception { StringBuilder sb = new StringBuilder(); String delimiter = StringUtils.EMPTY; for (String fileName : attachedFileNames.split(",")) { sb.append(delimiter).append(MimeUtility.decodeText(fileName)); delimiter = ","; } return sb.toString(); }
GetMailMessageService { protected String decodeAttachedFileNames(String attachedFileNames) throws Exception { StringBuilder sb = new StringBuilder(); String delimiter = StringUtils.EMPTY; for (String fileName : attachedFileNames.split(",")) { sb.append(delimiter).append(MimeUtility.decodeText(fileName)); delimiter = ","; } return sb.toString(); } }
GetMailMessageService { protected String decodeAttachedFileNames(String attachedFileNames) throws Exception { StringBuilder sb = new StringBuilder(); String delimiter = StringUtils.EMPTY; for (String fileName : attachedFileNames.split(",")) { sb.append(delimiter).append(MimeUtility.decodeText(fileName)); delimiter = ","; } return sb.toString(); }  }
GetMailMessageService { protected String decodeAttachedFileNames(String attachedFileNames) throws Exception { StringBuilder sb = new StringBuilder(); String delimiter = StringUtils.EMPTY; for (String fileName : attachedFileNames.split(",")) { sb.append(delimiter).append(MimeUtility.decodeText(fileName)); delimiter = ","; } return sb.toString(); }  Map<String, String> execute(GetMailMessageInput getMailMessageInput); }
GetMailMessageService { protected String decodeAttachedFileNames(String attachedFileNames) throws Exception { StringBuilder sb = new StringBuilder(); String delimiter = StringUtils.EMPTY; for (String fileName : attachedFileNames.split(",")) { sb.append(delimiter).append(MimeUtility.decodeText(fileName)); delimiter = ","; } return sb.toString(); }  Map<String, String> execute(GetMailMessageInput getMailMessageInput);  }