add test case

git-svn-id: https://svn.apache.org/repos/asf/xmlbeans/trunk@1902428 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/xmlbeans/XmlOptions.java b/src/main/java/org/apache/xmlbeans/XmlOptions.java
index 09a2d07..5ca03f9 100644
--- a/src/main/java/org/apache/xmlbeans/XmlOptions.java
+++ b/src/main/java/org/apache/xmlbeans/XmlOptions.java
@@ -1174,9 +1174,9 @@
 
     /**
      * This option controls whether or not operations on XmlBeans are
-     * thread safe.  When not on, all XmlBean operations will be syncronized.
+     * thread safe.  When not on, all XmlBean operations will be synchronized.
      * This provides for multiple thread the ability to access a single
-     * XmlBeans simultainously, but has a perf impact.  If set, then
+     * XmlBeans simultaneously, but has a perf impact.  If set, then
      * only one thread may access an XmlBean.
      */
     public XmlOptions setUnsynchronized() {
diff --git a/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java b/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java
index eae956f..00dc462 100644
--- a/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java
+++ b/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java
@@ -1584,7 +1584,7 @@
                 _lookupStringEnumEntry = lookupStringEnumEntry;
             }
         }
-        // HACKHACK: two syncrhonized blocks force a memory barrier:
+        // HACKHACK: two synchronized blocks force a memory barrier:
         // BUGBUG: this behavior is likely to change in future VMs
         synchronized (this) {
             _stringEnumEnsured = true;
diff --git a/src/test/java/misc/checkin/XmlOptionsTest.java b/src/test/java/misc/checkin/XmlOptionsTest.java
new file mode 100644
index 0000000..034fbfa
--- /dev/null
+++ b/src/test/java/misc/checkin/XmlOptionsTest.java
@@ -0,0 +1,33 @@
+/*   Copyright 2022 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package misc.checkin;
+
+import org.apache.xmlbeans.XmlOptions;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class XmlOptionsTest {
+    @Test
+    void testUnsynchronizedFlag() {
+        XmlOptions xmlOptions = new XmlOptions();
+        assertFalse(xmlOptions.isUnsynchronized());
+        xmlOptions.setUnsynchronized();
+        assertTrue(xmlOptions.isUnsynchronized());
+        xmlOptions.setUnsynchronized(false);
+        assertFalse(xmlOptions.isUnsynchronized());
+    }
+}