public void Write_4BE() { byte[] want = { 0x98, 0x76, 0xAB, 0xCD }; byte[] got; using (var os = new OtpOutputStream()) { os.Write4BE(0x9876ABCD); got = os.ToArray(); } CollectionAssert.AreEqual(want, got); }