Statement
A customer report: “On page 1 I don't see the first products, sometimes the same product shows on two pages and the last one never appears”. paginate(items, page, pageSize) must return { items, page, totalPages, hasNext }: pages start at 1; totalPages is at least 1 (an empty list has one empty page); a page below 1 is treated as 1 and one above totalPages as the last one. The code has several bugs: find and fix them. In the explanation, write the bug report for one of them as you would in Jira: steps, expected result and actual result.