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