InterruptingImmediateSupplier implements ImmediateSupplier<T>, DeferredSupplier<T> { public static <T> InterruptingImmediateSupplier<T> of(final Object o) { return InterruptingImmediateSupplier.<T>ofSafe(o).get(); } InterruptingImmediateSupplier(Supplier<T> nestedSupplier); @Override Maybe<T> getImmediately(); @Override T get(); static InterruptingImmediateSupplier<T> of(final Object o); @SuppressWarnings("unchecked") static ReferenceWithError<InterruptingImmediateSupplier<T>> ofSafe(final Object o);  }
@Test(expectedExceptions=UnsupportedOperationException.class) public void testOfInvalidType() throws Exception { InterruptingImmediateSupplier.of("myval"); }