// We throw TimeoutException to indicate "node1" holds the lock
// A second attempt should succeed if the local lock is released
// We return normally to indicate success
doThrow(new TimeoutException(node1)).doNothing().when(handler).lockFromCluster("test", caller1, 1000);
RemoteLockResponse rsp = target.remoteLock("test", caller1, 1000);
assertEquals(RemoteLockResponse.Flag.FAIL, rsp.flag);
assertEquals(node1, rsp.holder);
rsp = target.remoteLock("test", caller1, 1000);