    @Test
    public void findMails() throws Exception {

        String url = "/mails/2";
        MultiValueMap<String,String> params = new LinkedMultiValueMap<>();
        params.put("target", Arrays.asList("receiver"));
        params.put("mail_status",Arrays.asList("all"));
        MvcResult mvcResult = mvc.perform(MockMvcRequestBuilders.get(url).params(params).accept(MediaType.APPLICATION_JSON)).andReturn();
        int status = mvcResult.getResponse().getStatus();
        String content = mvcResult.getResponse().getContentAsString();
        assertEquals(status,200);
        PageInfo<MailDO> mails = mailService.findByReceiver(2L, 1, 5, MailStatus.ALL);
        PageInfo<MailDO> result = mapper.readValue(content, new TypeReference<PageInfo<MailDO>>() {
        });
        log.info("result:{}",result.getList());
        assertEquals(result.getList(),mails.getList());
    }