@Test
public void testDecodePrivFrame() {

  byte[] rawId3 = buildSingleFrameTag("PRIV", new byte[] {116, 101, 115, 116, 0, 1, 2, 3, 4});
  Id3Decoder decoder = new Id3Decoder();
  Metadata metadata = decoder.decode(rawId3, rawId3.length);
  assertThat(metadata.length()).isEqualTo(1);
  PrivFrame privFrame = (PrivFrame) metadata.get(0);
  assertThat(privFrame.owner).isEqualTo("test");
  assertThat(privFrame.privateData).isEqualTo(new byte[]{1, 2, 3, 4});
  // Test empty.
  rawId3 = buildSingleFrameTag("PRIV", new byte[0]);
  metadata = decoder.decode(rawId3, rawId3.length);
  assertThat(metadata.length()).isEqualTo(1);
  privFrame = (PrivFrame) metadata.get(0);
  assertThat(privFrame.owner).isEmpty();
  assertThat(privFrame.privateData).isEqualTo(new byte[0]);
}