### Question:
Id3Decoder implements MetadataDecoder { private static @Nullable TextInformationFrame decodeTxxxFrame( ParsableByteArray id3Data, int frameSize) throws UnsupportedEncodingException { if (frameSize < 1) { return null; } int encoding = id3Data.readUnsignedByte(); String charset = getCharsetName(encoding); byte[] data = new byte[frameSize - 1]; id3Data.readBytes(data, 0, frameSize - 1); int descriptionEndIndex = indexOfEos(data, 0, encoding); String description = new String(data, 0, descriptionEndIndex, charset); int valueStartIndex = descriptionEndIndex + delimiterLength(encoding); int valueEndIndex = indexOfEos(data, valueStartIndex, encoding); String value = decodeStringIfValid(data, valueStartIndex, valueEndIndex, charset); return new TextInformationFrame("TXXX", description, value); } 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 testDecodeTxxxFrame() { byte[] rawId3 = buildSingleFrameTag("TXXX", new byte[] {3, 0, 109, 100, 105, 97, 108, 111, 103, 95, 86, 73, 78, 68, 73, 67, 79, 49, 53, 50, 55, 54, 54, 52, 95, 115, 116, 97, 114, 116, 0}); Id3Decoder decoder = new Id3Decoder(); Metadata metadata = decoder.decode(rawId3, rawId3.length); assertThat(metadata.length()).isEqualTo(1); TextInformationFrame textInformationFrame = (TextInformationFrame) metadata.get(0); assertThat(textInformationFrame.id).isEqualTo("TXXX"); assertThat(textInformationFrame.description).isEmpty(); assertThat(textInformationFrame.value).isEqualTo("mdialog_VINDICO1527664_start"); rawId3 = buildSingleFrameTag("TXXX", new byte[0]); metadata = decoder.decode(rawId3, rawId3.length); assertThat(metadata.length()).isEqualTo(0); rawId3 = buildSingleFrameTag("TXXX", new byte[] {ID3_TEXT_ENCODING_UTF_8}); metadata = decoder.decode(rawId3, rawId3.length); assertThat(metadata.length()).isEqualTo(1); textInformationFrame = (TextInformationFrame) metadata.get(0); assertThat(textInformationFrame.id).isEqualTo("TXXX"); assertThat(textInformationFrame.description).isEmpty(); assertThat(textInformationFrame.value).isEmpty(); }