@Test
public void testAppend() {

    boolean marker = false;
    byte payloadType = 9;
    int seqNumber = 13717;
    int timestamp = 1234897;
    long ssrc = 1438967189;
    byte[] bin = new byte[12];
    bin[0] = (byte) (0x80);
    bin[1] = marker ? (byte) (payloadType | 0x80) : (byte) (payloadType & 0x7f);
    bin[2] = ((byte) ((seqNumber & 0xFF00) >> 8));
    bin[3] = ((byte) (seqNumber & 0x00FF));
    bin[4] = ((byte) ((timestamp & 0xFF000000) >> 24));
    bin[5] = ((byte) ((timestamp & 0x00FF0000) >> 16));
    bin[6] = ((byte) ((timestamp & 0x0000FF00) >> 8));
    bin[7] = ((byte) ((timestamp & 0x000000FF)));
    bin[8] = ((byte) ((ssrc & 0xFF000000) >> 24));
    bin[9] = ((byte) ((ssrc & 0x00FF0000) >> 16));
    bin[10] = ((byte) ((ssrc & 0x0000FF00) >> 8));
    bin[11] = ((byte) ((ssrc & 0x000000FF)));
    RtpHeader h2 = new RtpHeader();
    int i = 0;
    while (!h2.isFilled()) {
        h2.append(bin, i++, 1);
    }
    
    assertEquals(marker, h2.getMarker());
    assertEquals(payloadType, h2.getPayloadType());
    assertEquals(seqNumber, h2.getSeqNumber());
    assertEquals(timestamp, h2.getTimestamp());
    assertEquals(ssrc, h2.getSsrc());
}