### Question:
UserRepositoryImpl { @SuppressWarnings({ "rawtypes", "unchecked" }) public PageImpl<List<Map<String, Object>>> getPageAll(Pageable pageable){ Query query = entityManager.createNativeQuery("select u.* from user u"); query.setFirstResult(pageable.getPageNumber() * pageable.getPageSize()) .setMaxResults(pageable.getPageSize()) .unwrap(SQLQuery.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP); List rows = query.getResultList(); query = entityManager.createNativeQuery("select count(0) from user u"); int total = Integer.parseInt(query.getSingleResult().toString()); PageImpl pageImpl = new PageImpl<>(rows, pageable, total); return pageImpl; }  @SuppressWarnings({ "rawtypes", "unchecked" }) PageImpl<List<Map<String, Object>>> getPageAll(Pageable pageable); @SuppressWarnings({ "rawtypes", "unchecked" }) List<Map<String, Object>> getAll(); @SuppressWarnings({ "rawtypes", "unchecked" }) List<Map<String, Object>> getAllBy1(); @SuppressWarnings({ "rawtypes", "unchecked" }) List<UserEntity> getAllBy2(); @SuppressWarnings({ "rawtypes", "unchecked" }) List<User> getAllBy3();  }### Answer:
@Test public void getPageAllTest(){ Sort sort = new Sort(Sort.Direction.ASC, "id"); Pageable pageAble = new PageRequest(0, 10, sort); PageImpl<List<Map<String , Object>>> page = userRepoImpl.getPageAll(pageAble); log.info("\n-->page={}", JSON.toJSON(page)); }