Mpeg4DecodedStreamData implements DecodedStreamData { @Override public void accept(Visitor visitor) { notNull(visitor, "visitor must be non-null"); visitor.visit(this); } Mpeg4DecodedStreamData(List<NALUnit> nalUnits, int packetId); List<NALUnit> getNalUnits(); @Override int getPacketId(); @Override void accept(Visitor visitor);  }
@Test public void testAccept() { DecodedStreamData.Visitor visitor = mock(DecodedStreamData.Visitor.class); mpeg4DecodedStreamData.accept(visitor); verify(visitor).visit(mpeg4DecodedStreamData); }