package peer

import "testing"

func TestHeaderMarshalParse(t *testing.T) {
	nIn := Header{
		StreamID: 23,
		Counter:  3212,
		SourceIP: 34,
		DestIP:   200,
	}

	buf := make([]byte, headerSize)
	nIn.Marshal(buf)

	nOut := Header{}
	nOut.Parse(buf)
	if nIn != nOut {
		t.Fatal(nIn, nOut)
	}
}
