### Question:
PageRequest implements Pageable { @Override public int getPageNumber() { return pageNumber; } PageRequest(String requestedPageNumber, int pageSize);  PageRequest(int pageNumber, int pageSize); @Override int getPageNumber(); @Override int getPageSize(); @Override int getOffset(); @Override Sort getSort(); void adjustPageNumber(int totalCount); static PageRequest fetchFromPage(Page page); static final int FIRST_PAGE_NUMBER; static final int MAX_PAGE; }### Answer:
@Test public void testConstructor_MaxPageNumberWithLeadingZeroesConvertedToMaxPageNumber() { pageRequest = new PageRequest(LEAD_ZERO_MAX_NUMBER, PAGE_SIZE_10); assertEquals(pageRequest.getPageNumber(), PageRequest.MAX_PAGE); }
@Test public void testConstructor_TooLongPageNumberWithLeadingZeroesConvertedToMaxIntValue() { pageRequest = new PageRequest(LEAD_ZERO_BIG_NUMBER, PAGE_SIZE_10); assertEquals(pageRequest.getPageNumber(), Integer.MAX_VALUE); }
@Test public void testConstructor_TooBigPageNumberConvertedToMaxIntValue() { pageRequest = new PageRequest(BIG_NUMBER, PAGE_SIZE_10); assertEquals(pageRequest.getPageNumber(), Integer.MAX_VALUE); }
@Test public void testConstructor_LessThanOnePageNumberConvertedToFirstPageNumber() { pageRequest = new PageRequest(REQUESTED_ZERO_PAGE_NUMBER, PAGE_SIZE_10); assertEquals(pageRequest.getPageNumber(), FIRST_PAGE_NUMBER); }