### Question:
BaseService { protected void putMsg(Map<String, Object> result, Status status, Object... statusParams) { result.put(Constants.STATUS, status); if (statusParams != null && statusParams.length > 0) { result.put(Constants.MSG, MessageFormat.format(status.getMsg(), statusParams)); } else { result.put(Constants.MSG, status.getMsg()); } }  static Cookie getCookie(HttpServletRequest request, String name);  }### Answer:
@Test public void testPutMsg(){ Map<String, Object> result = new HashMap<>(); baseService.putMsg(result, Status.SUCCESS); Assert.assertEquals(Status.SUCCESS,result.get(Constants.STATUS)); baseService.putMsg(result, Status.PROJECT_NOT_FOUNT,"test"); }
@Test public void testPutMsgTwo(){ Result result = new Result(); baseService.putMsg(result, Status.SUCCESS); Assert.assertEquals(Status.SUCCESS.getMsg(),result.getMsg()); baseService.putMsg(result,Status.PROJECT_NOT_FOUNT,"test"); }