private unsafe void TestToAndFromNative(Acl acl) { IntPtr nativePtr = IntPtr.Zero; Acl second = null; Acl first = acl; var firstStr = AccessControlUtility.ToString(first); LogHelper.Log("Managed ACL = {0}", firstStr); using (var pinCollection = new PinCollection()) { nativePtr = acl.ToNative(pinCollection); second = Acl.FromNative((NativeTypes.FABRIC_SECURITY_ACL *)nativePtr); } var secondStr = AccessControlUtility.ToString(second); LogHelper.Log("FromNative ACL = {0}", secondStr); Assert.AreEqual <string>(firstStr, secondStr, "Managed Acl == FromNative Acl"); }