public void Write_8BE() { byte[] want = { 0x12, 0xAD, 0xBE, 0xEF, 0x98, 0x76, 0xAB, 0xCD }; byte[] got; using (var os = new OtpOutputStream()) { os.Write8BE(0x12ADBEEF9876ABCD); got = os.ToArray(); } CollectionAssert.AreEqual(want, got); }