### Question:
WeaverSubscribeOnComponentObservable extends WeaverSubscribeOnComponentAbstract<Observable> { @Override public Observable build() throws Throwable { return buildComponentInternal(); } WeaverSubscribeOnComponentObservable(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()}); WeaverSubscribeOnComponentObservable weaverOnSubscribeComponentObservable = new WeaverSubscribeOnComponentObservable(proceedingJoinPoint, parentWeaverComponent); Observable observable = weaverOnSubscribeComponentObservable.build(); observable.subscribe(observer); observer.dispose(); observer.assertComplete(); verify(componentInfo).setSubscribeOnScheduler(anyString()); verify(componentInfo).setSubscribeOnThread(anyString()); }
@Test public void buildWithoutParent() throws Throwable { when(proceedingJoinPoint.proceed()).thenReturn(Observable.just(1)); WeaverSubscribeOnComponentObservable weaverOnSubscribeComponentObservable = new WeaverSubscribeOnComponentObservable(proceedingJoinPoint, null); Observable observable = weaverOnSubscribeComponentObservable.build(); observable.subscribe(observer); observer.dispose(); observer.assertComplete(); verify(componentInfo, times(0)).setSubscribeOnScheduler(anyString()); verify(componentInfo, times(0)).setSubscribeOnThread(anyString()); }