### Question:
EmailService { public boolean doSendNewTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser) { logger.info("send new todo email to:" + userDO.getUsername() + " for id:" + dailyVO.getId()); try { HtmlEmail email = buildHtmlEmail(userDO.getMail(), userDO.getDisplayName()); email.setHtmlMsg(TplUtils.doNewTodoNotify(sponsorUser, dailyVO, userDO.getDisplayName())); email.send(); return true; } catch (Exception e) { logger.error(e.getMessage(), e); return false; } }  boolean doSendNewTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser); boolean doSendUpdateTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser); boolean doSendAcceptFeedbackTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser); boolean doSendInitFeedbackTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser); boolean doFinishTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser); HtmlEmail buildHtmlEmail(String emailAddress, String displayName); boolean doSendSubmitTodo(TodoDetailVO todoDetailVO); boolean doSendCompleteTodo(TodoDetailVO todoDetailVO);  }### Answer:
@Test public void testdoSendNewTodo() { UserDO sponsorUser = new UserDO(); sponsorUser.setDisplayName("飞雪"); UserDO userDO = new UserDO(); userDO.setMail("xiaozh@net"); userDO.setDisplayName("飞雪"); TodoDailyDO dailyDO = new TodoDailyDO(); TodoConfigDO levelOne = new TodoConfigDO(); levelOne.setConfigName("测试一级类目"); TodoConfigDO levelTwo = new TodoConfigDO(); levelTwo.setConfigName("测试二级类目"); TodoDailyVO dailyVO = new TodoDailyVO(dailyDO, levelOne, levelTwo); FastDateFormat dateFormat = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss"); dailyVO.setGmtCreate(dateFormat.format(new Date())); dailyVO.setGmtModify(dateFormat.format(new Date())); emailService.doSendUpdateTodo(userDO, dailyVO, sponsorUser); }
@Test public void testdoSendNewTodo2() { UserDO sponsorUser = new UserDO(); sponsorUser.setDisplayName("梁荐"); UserDO userDO = new UserDO(); userDO.setMail("@net"); userDO.setDisplayName("梁荐"); TodoDailyDO dailyDO = new TodoDailyDO(); TodoConfigDO levelOne = new TodoConfigDO(); levelOne.setConfigName("测试一级类目"); TodoConfigDO levelTwo = new TodoConfigDO(); levelTwo.setConfigName("测试二级类目"); TodoDailyVO dailyVO = new TodoDailyVO(dailyDO, levelOne, levelTwo); emailService.doSendNewTodo(userDO, dailyVO, sponsorUser); }