private static List<StripeInformation> toStripeInformation(List<DwrfProto.StripeInformation> stripeInformationList)
    {
        ImmutableList.Builder<StripeInformation> stripeInfoBuilder = ImmutableList.builderWithExpectedSize(stripeInformationList.size());
        List<byte[]> previousKeyMetadata = ImmutableList.of();
        for (DwrfProto.StripeInformation dwrfStripeInfo : stripeInformationList) {
            StripeInformation prestoStripeInfo = toStripeInformation(dwrfStripeInfo, previousKeyMetadata);
            stripeInfoBuilder.add(prestoStripeInfo);
            previousKeyMetadata = prestoStripeInfo.getKeyMetadata();
        }
        return stripeInfoBuilder.build();
    }
@Test
    public void testStripeInformationRows()
            throws IOException
    {
        long aLongNumber = Integer.MAX_VALUE + 1000L;
        for (OptionalLong stripeRawDataSize : ImmutableList.of(OptionalLong.empty(), OptionalLong.of(1_000_123))) {
            StripeInformation expectedStripeInformation = new StripeInformation(aLongNumber, aLongNumber, aLongNumber, aLongNumber, aLongNumber, stripeRawDataSize, ImmutableList.of());
            DwrfProto.StripeInformation dwrfStripeInformation = DwrfMetadataWriter.toStripeInformation(expectedStripeInformation);

            DwrfProto.Footer protoFooter = DwrfProto.Footer.newBuilder()
                    .setNumberOfRows(aLongNumber)
                    .setRowIndexStride(10_000)
                    .addStripes(dwrfStripeInformation)
                    .build();

            Footer footer = convertToFooter(protoFooter);
            assertEquals(footer.getNumberOfRows(), aLongNumber);
            assertEquals(footer.getStripes().size(), 1);
            StripeInformation actualStripeInformation = footer.getStripes().get(0);
            assertEquals(actualStripeInformation.getOffset(), expectedStripeInformation.getOffset());
            assertEquals(actualStripeInformation.getNumberOfRows(), expectedStripeInformation.getNumberOfRows());
            assertEquals(actualStripeInformation.getIndexLength(), expectedStripeInformation.getIndexLength());
            assertEquals(actualStripeInformation.getDataLength(), expectedStripeInformation.getDataLength());
            assertEquals(actualStripeInformation.getFooterLength(), expectedStripeInformation.getFooterLength());
            assertEquals(actualStripeInformation.getTotalLength(), expectedStripeInformation.getTotalLength());
            assertEquals(actualStripeInformation.getRawDataSize(), expectedStripeInformation.getRawDataSize());
        }
    }