### Question:
WeaverSubscribeOnComponentCompletable extends WeaverSubscribeOnComponentAbstract<Completable> { @Override public Completable build() throws Throwable { return buildComponentInternal(); } WeaverSubscribeOnComponentCompletable(ProceedingJoinPoint joinPoint, WeaverComponent<Completable> parentWeaverComponent); @Override Completable build();  }### Answer:
@Test public void build() throws Throwable { when(proceedingJoinPoint.proceed()).thenReturn(Completable.complete()); when(parentWeaverComponent.getComponentInfo()).thenReturn(componentInfo); when(proceedingJoinPoint.getArgs()).thenReturn(new Object[]{Schedulers.io()}); WeaverSubscribeOnComponentCompletable weaverOnSubscribeComponentCompletable = new WeaverSubscribeOnComponentCompletable(proceedingJoinPoint, parentWeaverComponent); Completable completable = weaverOnSubscribeComponentCompletable.build(); completable.subscribe(observer); observer.dispose(); observer.assertComplete(); verify(componentInfo).setSubscribeOnScheduler(anyString()); verify(componentInfo).setSubscribeOnThread(anyString()); }
@Test public void buildWithoutParent() throws Throwable { when(proceedingJoinPoint.proceed()).thenReturn(Completable.complete()); WeaverSubscribeOnComponentCompletable weaverOnSubscribeComponentCompletable = new WeaverSubscribeOnComponentCompletable(proceedingJoinPoint, null); Completable completable = weaverOnSubscribeComponentCompletable.build(); completable.subscribe(observer); observer.dispose(); observer.assertComplete(); verify(componentInfo, times(0)).setSubscribeOnScheduler(anyString()); verify(componentInfo, times(0)).setSubscribeOnThread(anyString()); }