### Question:
Page { public Page getPositions(int[] retainedPositions, int offset, int length) { requireNonNull(retainedPositions, "retainedPositions is null"); Block[] blocks = new Block[this.blocks.length]; for (int i = 0; i < blocks.length; i++) { blocks[i] = this.blocks[i].getPositions(retainedPositions, offset, length); } return wrapBlocksWithoutCopy(length, blocks); } Page(Block... blocks);  Page(int positionCount, Block... blocks); private  Page(boolean blocksCopyRequired, int positionCount, Block[] blocks); int getChannelCount(); int getPositionCount(); long getSizeInBytes(); long getLogicalSizeInBytes(); long getRetainedSizeInBytes(); Block getBlock(int channel); Page getSingleValuePage(int position); Page getRegion(int positionOffset, int length); Page appendColumn(Block block); void compact(); Page getLoadedPage(); @Override String toString(); Page getPositions(int[] retainedPositions, int offset, int length); Page copyPositions(int[] retainedPositions, int offset, int length); Page getColumns(int column); Page getColumns(int... columns); Page prependColumn(Block column); static final int INSTANCE_SIZE; }### Answer:
@Test public void testGetPositions() { int entries = 10; BlockBuilder blockBuilder = BIGINT.createBlockBuilder(null, entries); for (int i = 0; i < entries; i++) { BIGINT.writeLong(blockBuilder, i); } Block block = blockBuilder.build(); Page page = new Page(block, block, block).getPositions(new int[] {0, 1, 1, 1, 2, 5, 5}, 1, 5); assertEquals(page.getPositionCount(), 5); for (int i = 0; i < 3; i++) { assertEquals(page.getBlock(i).getLong(0, 0), 1); assertEquals(page.getBlock(i).getLong(1, 0), 1); assertEquals(page.getBlock(i).getLong(2, 0), 1); assertEquals(page.getBlock(i).getLong(3, 0), 2); assertEquals(page.getBlock(i).getLong(4, 0), 5); } }