@Override
    public boolean next() throws SQLException {
        if (skipAll) {
            return false;
        }
        if (!paginationContext.getActualRowCount().isPresent()) {
            return getMergedResult().next();
        }
        return rowNumber++ <= paginationContext.getActualRowCount().get() && getMergedResult().next();
    }
@Test
    void assertNextForSkipAll() throws SQLException {
        ShardingSphereDatabase database = mock(ShardingSphereDatabase.class, RETURNS_DEEP_STUBS);
        when(database.getSchema(DefaultDatabase.LOGIC_NAME)).thenReturn(schema);
        SQLServerSelectStatement sqlStatement = new SQLServerSelectStatement();
        sqlStatement.setProjections(new ProjectionsSegment(0, 0));
        sqlStatement.setLimit(new LimitSegment(0, 0, new NumberLiteralRowNumberValueSegment(0, 0, Long.MAX_VALUE, true), null));
        SelectStatementContext selectStatementContext =
                new SelectStatementContext(createShardingSphereMetaData(database), Collections.emptyList(), sqlStatement, DefaultDatabase.LOGIC_NAME, Collections.emptyList());
        ShardingDQLResultMerger resultMerger = new ShardingDQLResultMerger(TypedSPILoader.getService(DatabaseType.class, "SQLServer"));
        MergedResult actual = resultMerger.merge(Arrays.asList(mockQueryResult(), mockQueryResult(),
                mockQueryResult(), mockQueryResult()), selectStatementContext, mockShardingSphereDatabase(), mock(ConnectionContext.class));
        assertFalse(actual.next());
    }