@Test
public void readMetadataBlock_seekTableBlock_updatesStreamMetadata() throws Exception {

  ExtractorInput input = buildExtractorInput("flac/bear.flac");
  // Skip to seek table block.
  input.skipFully(FlacConstants.STREAM_MARKER_SIZE + FlacConstants.STREAM_INFO_BLOCK_SIZE);
  FlacStreamMetadataHolder metadataHolder = new FlacStreamMetadataHolder(buildStreamMetadata());
  long originalSampleRate = metadataHolder.flacStreamMetadata.sampleRate;
  FlacMetadataReader.readMetadataBlock(input, metadataHolder);
  assertThat(metadataHolder.flacStreamMetadata).isNotNull();
  // Check that metadata passed has not been erased.
  assertThat(metadataHolder.flacStreamMetadata.sampleRate).isEqualTo(originalSampleRate);
  assertThat(metadataHolder.flacStreamMetadata.seekTable).isNotNull();
  assertThat(metadataHolder.flacStreamMetadata.seekTable.pointSampleNumbers.length).isEqualTo(32);
}