### Question:
FakeLock implements Lock { @Override public boolean tryLock() { throw new UnsupportedOperationException(); } private  FakeLock(); @Override void lock(); @Override void unlock(); @Override void lockInterruptibly(); @Override boolean tryLock(); @Override boolean tryLock(long time, TimeUnit unit); @Override Condition newCondition(); static final Lock INSTANCE; }### Answer:
@Test(expected = UnsupportedOperationException.class) public void tryLock() throws Exception { FakeLock.INSTANCE.tryLock(); }
@Test(expected = UnsupportedOperationException.class) public void tryLock1() throws Exception { FakeLock.INSTANCE.tryLock(1, TimeUnit.SECONDS); }