EofFrame extends Frame { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null) return false; Frame frame = (Frame) o; return equals(frame); } EofFrame(); @Override boolean equals(Object o); boolean equals(Frame frame); @Override int hashCode();  }
@Test public void eofEqualsToEof() { assertEquals(Frame.EOF(), Frame.EOF()); assertTrue(Frame.EOF().equals(Frame.EOF())); }
@Test public void eofNotEqualsToRegularFrame() { Frame frame = create.frame().construct(); Frame eof = Frame.EOF(); assertFalse(eof.equals(frame)); assertFalse(frame.equals(eof)); }
@Test public void eofEqualsToFrameWithEofFLag() { Frame frame = create.frame().construct(); frame.setFlags(IMediaCodec.BUFFER_FLAG_END_OF_STREAM); Frame eof = Frame.EOF(); assertTrue(eof.equals(frame)); assertTrue(frame.equals(eof)); }