@Test
public void testReadIdHeader() throws Exception {

  byte[] data =
      TestUtil.getByteArray(
          ApplicationProvider.getApplicationContext(), "binary/vorbis/id_header");
  ParsableByteArray headerData = new ParsableByteArray(data, data.length);
  VorbisUtil.VorbisIdHeader vorbisIdHeader =
      VorbisUtil.readVorbisIdentificationHeader(headerData);
  assertThat(vorbisIdHeader.sampleRate).isEqualTo(22050);
  assertThat(vorbisIdHeader.version).isEqualTo(0);
  assertThat(vorbisIdHeader.framingFlag).isTrue();
  assertThat(vorbisIdHeader.channels).isEqualTo(2);
  assertThat(vorbisIdHeader.blockSize0).isEqualTo(512);
  assertThat(vorbisIdHeader.blockSize1).isEqualTo(1024);
  assertThat(vorbisIdHeader.bitrateMax).isEqualTo(-1);
  assertThat(vorbisIdHeader.bitrateMin).isEqualTo(-1);
  assertThat(vorbisIdHeader.bitrateNominal).isEqualTo(66666);
  assertThat(vorbisIdHeader.getApproximateBitrate()).isEqualTo(66666);
}