    @Test
    public void testTryLockAllWithTimeout_RollbackOnInterruptedException() throws Exception {

        HoldCountLock lock1 = new HoldCountLock(new ReentrantLock());
        HoldCountLock lock2 = new HoldCountLock(new ReentrantLock()) {
            @Override
            public boolean tryLock(long time, TimeUnit unit) throws InterruptedException {
                throw new InterruptedException();
            }
        };

        Exception expected = null;
        try {
            Locks.tryLockAll(1L, TimeUnit.MILLISECONDS, lock1, lock2);
        }
        catch (InterruptedException e) {
            expected = e;
        }
        assertNotNull(expected);
        assertEquals(0, lock1.holdCount().value);
        assertEquals(0, lock2.holdCount().value);
    }