### Question:
VorbisUtil { public static VorbisIdHeader readVorbisIdentificationHeader(ParsableByteArray headerData) throws ParserException { verifyVorbisHeaderCapturePattern(0x01, headerData, false); long version = headerData.readLittleEndianUnsignedInt(); int channels = headerData.readUnsignedByte(); long sampleRate = headerData.readLittleEndianUnsignedInt(); int bitrateMax = headerData.readLittleEndianInt(); int bitrateNominal = headerData.readLittleEndianInt(); int bitrateMin = headerData.readLittleEndianInt(); int blockSize = headerData.readUnsignedByte(); int blockSize0 = (int) Math.pow(2, blockSize & 0x0F); int blockSize1 = (int) Math.pow(2, (blockSize & 0xF0) >> 4); boolean framingFlag = (headerData.readUnsignedByte() & 0x01) > 0; byte[] data = Arrays.copyOf(headerData.data, headerData.limit()); return new VorbisIdHeader(version, channels, sampleRate, bitrateMax, bitrateNominal, bitrateMin, blockSize0, blockSize1, framingFlag, data); } private  VorbisUtil(); static int iLog(int x); static VorbisIdHeader readVorbisIdentificationHeader(ParsableByteArray headerData); static CommentHeader readVorbisCommentHeader(ParsableByteArray headerData); static boolean verifyVorbisHeaderCapturePattern(int headerType, ParsableByteArray header,
      boolean quiet); static Mode[] readVorbisModes(ParsableByteArray headerData, int channels);  }### Answer:
@Test public void testReadIdHeader() throws Exception { byte[] data = OggTestData.getIdentificationHeaderData(); 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); }