code: private List<Data> getBatchChunk(List<Data> list, int pageSize, int pageNumber) {
          if (list == null || list.isEmpty()) {
              return null;
          }
          int start = pageNumber * pageSize;
          int end = Math.min(start + pageSize, list.size());
          if (start >= end) {
              return null;
          }
          return list.subList(start, end);
      }
docs: Returns a sublist (page) of items in the provided list. The start and
  end index of the sublist are determined by the {@code pageSize} and
  {@code pageNumber} parameters. This method may be used to paginate
  through the entire list - the {@code pageSize} should be kept the same
  and the {@code pageNumber} should be incremented from {@code 0} until
  the returned sublist is {@code null}.
  
  @param list       list to be paged
  @param pageSize   size of a page batch operation size
  @param pageNumber batch chunk number
  @return a sublist of items or {@code null} if the provided list is empty or
  the sub-list does not contain any items