@SuppressWarnings("unchecked")
@Test
public void shouldNotInvokeFuncUntilSubscription() throws Exception {

    Callable<Object> func = mock(Callable.class);
    when(func.call()).thenReturn(new Object());
    Observable<Object> fromCallableObservable = Observable.fromCallable(func);
    verifyZeroInteractions(func);
    fromCallableObservable.subscribe();
    verify(func).call();
}