public static OffsetBasedPagination forOffset(int offset, int pageSize) {
    checkArgument(offset >= 0, "offset must be >= 0");
    checkArgument(pageSize >= 1, "page size must be >= 1");
    return new OffsetBasedPagination(offset, pageSize);
  }
@Test
  void forOffset_whenNegativePageSize_shouldfailsWithIAE() {
    assertThatThrownBy(() -> OffsetBasedPagination.forOffset(1, -1))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("page size must be >= 1");
  }