### Question:
Id3Decoder implements MetadataDecoder { @SuppressWarnings("ByteBufferBackingArray") @Override public @Nullable Metadata decode(MetadataInputBuffer inputBuffer) { ByteBuffer buffer = inputBuffer.data; return decode(buffer.array(), buffer.limit()); } Id3Decoder();  Id3Decoder(@Nullable FramePredicate framePredicate); @SuppressWarnings("ByteBufferBackingArray") @Override @Nullable Metadata decode(MetadataInputBuffer inputBuffer); @Nullable Metadata decode(byte[] data, int size); static final FramePredicate NO_FRAMES_PREDICATE; static final int ID3_TAG; static final int ID3_HEADER_LENGTH; }### Answer:
@Test public void testDecodeMultiFrames() { byte[] rawId3 = buildMultiFramesTag( new FrameSpec( "COMM", new byte[] { 3, 101, 110, 103, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 0, 116, 101, 120, 116, 0 }), new FrameSpec( "APIC", new byte[] { 3, 105, 109, 97, 103, 101, 47, 106, 112, 101, 103, 0, 16, 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 })); Id3Decoder decoder = new Id3Decoder(); Metadata metadata = decoder.decode(rawId3, rawId3.length); assertThat(metadata.length()).isEqualTo(2); CommentFrame commentFrame = (CommentFrame) metadata.get(0); ApicFrame apicFrame = (ApicFrame) metadata.get(1); assertThat(commentFrame.language).isEqualTo("eng"); assertThat(commentFrame.description).isEqualTo("description"); assertThat(commentFrame.text).isEqualTo("text"); assertThat(apicFrame.mimeType).isEqualTo("image/jpeg"); assertThat(apicFrame.pictureType).isEqualTo(16); assertThat(apicFrame.description).isEqualTo("Hello World"); assertThat(apicFrame.pictureData).hasLength(10); assertThat(apicFrame.pictureData).isEqualTo(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}); }