### Question:
OzoneManagerLock { @Deprecated public void releaseLock(Resource resource, String... resources) { String resourceName = generateResourceName(resource, resources); unlock(resource, resourceName, manager::writeUnlock, WRITE_LOCK); } OzoneManagerLock(ConfigurationSource conf); @Deprecated boolean acquireLock(Resource resource, String... resources); boolean acquireReadLock(Resource resource, String... resources); boolean acquireWriteLock(Resource resource, String... resources); boolean acquireMultiUserLock(String firstUser, String secondUser); void releaseMultiUserLock(String firstUser, String secondUser); void releaseWriteLock(Resource resource, String... resources); void releaseReadLock(Resource resource, String... resources); @Deprecated void releaseLock(Resource resource, String... resources);  }### Answer:
@Test public void releaseLockWithOutAcquiringLock() { OzoneManagerLock lock = new OzoneManagerLock(new OzoneConfiguration()); try { lock.releaseLock(OzoneManagerLock.Resource.USER_LOCK, "user3"); fail("releaseLockWithOutAcquiringLock failed"); } catch (IllegalMonitorStateException ex) { String message = "Releasing lock on resource $user3 without acquiring " + "lock"; Assert.assertTrue(ex.getMessage(), ex.getMessage().contains(message)); } }