### Question:
WeaverObserveOnComponentAbstract implements WeaverObserveOnComponent<T> { protected String getSchedulerName() { Object[] args = getJoinPoint().getArgs(); if (args == null || args.length == 0) return null; RxScheduler rxScheduler = RxScheduler.fromClass(args[0].getClass()); return rxScheduler != null ? rxScheduler.name() : args[0].getClass().getSimpleName(); } WeaverObserveOnComponentAbstract(ProceedingJoinPoint joinPoint, WeaverComponent<T> parentWeaverComponent); @Override ProceedingJoinPoint getJoinPoint(); @Override WeaverComponent<T> getParentWeaverComponent();  }### Answer:
@Test public void getSchedulerName() { when(proceedingJoinPoint.getArgs()).thenReturn(new Object[]{Schedulers.io()}); assertEquals(RxScheduler.IO.name(), weaverComponent.getSchedulerName()); }
@Test public void getSchedulerNameWithNoArgs() { when(proceedingJoinPoint.getArgs()).thenReturn(null); assertNull(weaverComponent.getSchedulerName()); }
@Test public void getSchedulerNameWithUnknownScheduler() { Object scheduler = new Object(); when(proceedingJoinPoint.getArgs()).thenReturn(new Object[]{scheduler}); assertEquals(scheduler.getClass().getSimpleName(), weaverComponent.getSchedulerName()); }