/// <summary>
        /// Create a native object, convert it to managed and assert the conversion was sucessful.
        /// </summary>
        /// <param name="stringConverter">
        /// Method used to marshal a managed string.
        /// </param>
        /// <param name="setter">
        /// Method used to convert a native object to a managed object.
        /// </param>
        private static unsafe void TestSetFromNative(Func <string, IntPtr> stringConverter, Action <JET_INSTANCE_INFO, NATIVE_INSTANCE_INFO> setter)
        {
            JET_INSTANCE_INFO managed   = new JET_INSTANCE_INFO();
            IntPtr *          databases = stackalloc IntPtr[2];

            databases[0] = stringConverter(Database0);
            databases[1] = stringConverter(Database1);

            NATIVE_INSTANCE_INFO native = new NATIVE_INSTANCE_INFO
            {
                hInstanceId        = FakeInstance,
                cDatabases         = new IntPtr(2),
                szInstanceName     = stringConverter(InstanceName),
                szDatabaseFileName = databases
            };

            setter(managed, native);
            EseInteropTestHelper.MarshalFreeHGlobal(native.szInstanceName);
            EseInteropTestHelper.MarshalFreeHGlobal(databases[0]);
            EseInteropTestHelper.MarshalFreeHGlobal(databases[1]);

            CheckManaged(managed);
        }