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