public static <T> T untilNull(Callable<T> callable, long timeout, TimeUnit unit) {
        return SleepBuilder.<T>sleep()
                .withComparer(argument -> argument == null)
                .withTimeout(timeout, unit)
                .withStatement(callable)
                .build();
    }
public static < T > T untilNull ( Callable < T > callable , long timeout , TimeUnit unit ) { return SleepBuilder . < T > sleep ( ) . withComparer ( argument -> argument == null ) . withTimeout ( timeout , unit ) . withStatement ( callable ) . build ( ) ; }
Causes the current thread to wait until the callable is returning
{@code null}, or the specified waiting time elapses.

<p>
If the callable returns not null then this method returns immediately
with the value returned by callable.

<p>
Any {@code InterruptedException}'s are suppress and logged. Any
{@code Exception}'s thrown by callable are propagate as SystemException

@param callable callable checked by this method
@param timeout the maximum time to wait
@param unit the time unit of the {@code timeout} argument
@return value returned by callable method
@throws SystemException if callable throws exception