public virtual void  TestDefaultValueWithoutSetting()
        {
            // LUCENE-1805: make sure default get returns null,
            // twice in a row
            LightWeightThreadLocal <object> ctl = new LightWeightThreadLocal <object>();

            Assert.IsNull(ctl.Get(null));
            Assert.IsNull(ctl.Get(null));
        }
        public virtual void  TestInitValue()
        {
            LightWeightThreadLocal <object> tl = new LightWeightThreadLocal <object>(_ => TEST_VALUE);

            System.String str = (System.String)tl.Get(null);
            Assert.AreEqual(TEST_VALUE, str);
        }
        public virtual void  TestNullValue()
        {
            // Tests that null can be set as a valid value (LUCENE-1805). This
            // previously failed in get().
            LightWeightThreadLocal <object> ctl = new LightWeightThreadLocal <object>();

            ctl.Set(null);
            Assert.IsNull(ctl.Get(null));
        }