### Question:
WeaverObserveOnComponentObservable extends WeaverObserveOnComponentAbstract<Observable> { @Override public Observable build() throws Throwable { return buildComponentInternal(); } WeaverObserveOnComponentObservable(ProceedingJoinPoint joinPoint, WeaverComponent<Observable> parentWeaverComponent); @Override Observable build();  }### Answer:
@Test public void build() throws Throwable { when(proceedingJoinPoint.proceed()).thenReturn(Observable.just(1)); when(parentWeaverComponent.getComponentInfo()).thenReturn(componentInfo); when(proceedingJoinPoint.getArgs()).thenReturn(new Object[]{Schedulers.io()}); WeaverObserveOnComponentObservable weaverObserveOnComponentObservable = new WeaverObserveOnComponentObservable(proceedingJoinPoint, parentWeaverComponent); Observable observable = weaverObserveOnComponentObservable.build(); observable.subscribe(observer); observer.dispose(); observer.assertComplete(); verify(componentInfo).setObserveOnScheduler(anyString()); }
@Test public void buildWithoutParent() throws Throwable { when(proceedingJoinPoint.proceed()).thenReturn(Observable.just(1)); WeaverObserveOnComponentObservable weaverObserveOnComponentObservable = new WeaverObserveOnComponentObservable(proceedingJoinPoint, null); Observable observable = weaverObserveOnComponentObservable.build(); observable.subscribe(observer); observer.dispose(); observer.assertComplete(); verify(componentInfo, times(0)).setObserveOnScheduler(anyString()); }