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