public void TestToString() { ReentrantLock locker = new ReentrantLock(); String us = locker.ToString(); Assert.IsTrue(us.IndexOf("Unlocked") >= 0); locker.Lock(); String ls = locker.ToString(); Assert.IsTrue(ls.IndexOf("Locked") >= 0); }