public void ToBinary_Should_ReturnExpectedResult() { // Arrange var expected = new byte[] { 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00, 0x2E, 0x43, 0xAC, 0x40, 0xC0, 0x85, 0x38, 0x5D, 0x07, 0xE5, 0x3B, 0x2B }; var sid = "S-1-5-21-1085031214-1563985344-725345543"; // Act var actual = Sid.ToBinary(sid); // Assert Assert.Equal(expected, actual); }