### Question:
SimpleReadWriteLock { public synchronized boolean tryWriteLock() { if (!isFree()) { return false; } else { status = -1; return true; } }  synchronized boolean tryReadLock(); synchronized void releaseReadLock(); synchronized boolean tryWriteLock(); synchronized void releaseWriteLock();  }### Answer:
@Test public void testDoubleWriteLock() { SimpleReadWriteLock lock = new SimpleReadWriteLock(); assertTrue(lock.tryWriteLock()); assertFalse(lock.tryWriteLock()); }
@Test public void test_双重写锁() { SimpleReadWriteLock lock = new SimpleReadWriteLock(); assertEquals(true, lock.tryWriteLock()); assertEquals(false, lock.tryWriteLock()); }
@Test public void test_双重写锁() { SimpleReadWriteLock lock = new SimpleReadWriteLock(); assertTrue(lock.tryWriteLock()); assertFalse(lock.tryWriteLock()); }