request.setParameter("sort1.baseInfo.realname", "asc");
request.setParameter("sort2.id", "desc");
MethodParameter parameter = new MethodParameter(pageableAndSort, 0);
NativeWebRequest webRequest = new ServletWebRequest(request);
Pageable pageable = (Pageable) new PageableMethodArgumentResolver().resolveArgument(parameter, null, webRequest, null);
//内部会自动-1,从0开始
assertEquals(pn - 1, pageable.getPageNumber());
assertEquals(pageSize, pageable.getPageSize());
Sort expectedSort = new Sort(Sort.Direction.ASC, "baseInfo.realname").and(new Sort(Sort.Direction.DESC, "id"));
assertEquals(expectedSort, pageable.getSort());
}