@Test
public void getFirstSampleNumber_doesNotUpdateReadPositionAndAlignsPeekPosition()
    throws Exception {

  FlacStreamMetadataHolder streamMetadataHolder =
      new FlacStreamMetadataHolder(/* flacStreamMetadata= */ null);
  ExtractorInput input =
      buildExtractorInputReadingFromFirstFrame(
          "flac/bear_one_metadata_block.flac", streamMetadataHolder);
  long initialReadPosition = input.getPosition();
  // Advance peek position after block size bits.
  input.advancePeekPosition(FlacConstants.MAX_FRAME_HEADER_SIZE);
  FlacFrameReader.getFirstSampleNumber(input, streamMetadataHolder.flacStreamMetadata);
  assertThat(input.getPosition()).isEqualTo(initialReadPosition);
  assertThat(input.getPeekPosition()).isEqualTo(input.getPosition());
}