PaginationContext { public long getActualOffset() { if (null == offsetSegment) { return 0L; } return offsetSegment.isBoundOpened() ? actualOffset - 1 : actualOffset; } PaginationContext(final PaginationValueSegment offsetSegment, final PaginationValueSegment rowCountSegment, final List<Object> parameters); Optional<PaginationValueSegment> getOffsetSegment(); Optional<PaginationValueSegment> getRowCountSegment(); long getActualOffset(); Optional<Long> getActualRowCount(); Optional<Integer> getOffsetParameterIndex(); Optional<Integer> getRowCountParameterIndex(); long getRevisedOffset(); long getRevisedRowCount(final SelectStatementContext selectStatementContext);  }
@Test public void assertGetActualOffsetWithNumberLiteralPaginationValueSegment() { assertThat(new PaginationContext(getOffsetSegmentWithNumberLiteralPaginationValueSegment(), getRowCountSegmentWithNumberLiteralPaginationValueSegment(), getParameters()).getActualOffset(), is(30L)); }