public void sleep(Duration duration) {
        try {
            Thread.sleep(duration.toMillis());
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throw new RuntimeException(e);
        }
    }
Wrapper around {@link Thread#sleep(long)} that can be overridden in unit tests.

@author mpolden
zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/Sleeper.java