@Test public void testReactorTypes() throws Throwable { RateLimiter rateLimiter = RateLimiter.ofDefaults("test"); when(proceedingJoinPoint.proceed()).thenReturn(Single.just("Test")); assertThat( rxJava2RateLimiterAspectExt.handle(proceedingJoinPoint, rateLimiter, "testMethod")) .isNotNull(); when(proceedingJoinPoint.proceed()).thenReturn(Flowable.just("Test")); assertThat( rxJava2RateLimiterAspectExt.handle(proceedingJoinPoint, rateLimiter, "testMethod")) .isNotNull(); when(proceedingJoinPoint.proceed()).thenReturn(Completable.complete()); assertThat( rxJava2RateLimiterAspectExt.handle(proceedingJoinPoint, rateLimiter, "testMethod")) .isNotNull(); when(proceedingJoinPoint.proceed()).thenReturn(Maybe.just("Test")); assertThat( rxJava2RateLimiterAspectExt.handle(proceedingJoinPoint, rateLimiter, "testMethod")) .isNotNull(); when(proceedingJoinPoint.proceed()).thenReturn(Observable.just("Test")); assertThat( rxJava2RateLimiterAspectExt.handle(proceedingJoinPoint, rateLimiter, "testMethod")) .isNotNull(); }
@Override public Object handle(ProceedingJoinPoint proceedingJoinPoint, RateLimiter rateLimiter, String methodName) throws Throwable { RateLimiterOperator<?> rateLimiterOperator = RateLimiterOperator.of(rateLimiter); Object returnValue = proceedingJoinPoint.proceed(); return executeRxJava2Aspect(rateLimiterOperator, returnValue); }
RxJava2RateLimiterAspectExt implements RateLimiterAspectExt { @Override public Object handle(ProceedingJoinPoint proceedingJoinPoint, RateLimiter rateLimiter, String methodName) throws Throwable { RateLimiterOperator<?> rateLimiterOperator = RateLimiterOperator.of(rateLimiter); Object returnValue = proceedingJoinPoint.proceed(); return executeRxJava2Aspect(rateLimiterOperator, returnValue); } }
RxJava2RateLimiterAspectExt implements RateLimiterAspectExt { @Override public Object handle(ProceedingJoinPoint proceedingJoinPoint, RateLimiter rateLimiter, String methodName) throws Throwable { RateLimiterOperator<?> rateLimiterOperator = RateLimiterOperator.of(rateLimiter); Object returnValue = proceedingJoinPoint.proceed(); return executeRxJava2Aspect(rateLimiterOperator, returnValue); }  }
RxJava2RateLimiterAspectExt implements RateLimiterAspectExt { @Override public Object handle(ProceedingJoinPoint proceedingJoinPoint, RateLimiter rateLimiter, String methodName) throws Throwable { RateLimiterOperator<?> rateLimiterOperator = RateLimiterOperator.of(rateLimiter); Object returnValue = proceedingJoinPoint.proceed(); return executeRxJava2Aspect(rateLimiterOperator, returnValue); }  @SuppressWarnings("unchecked") @Override boolean canHandleReturnType(Class returnType); @Override Object handle(ProceedingJoinPoint proceedingJoinPoint, RateLimiter rateLimiter,
        String methodName); }
RxJava2RateLimiterAspectExt implements RateLimiterAspectExt { @Override public Object handle(ProceedingJoinPoint proceedingJoinPoint, RateLimiter rateLimiter, String methodName) throws Throwable { RateLimiterOperator<?> rateLimiterOperator = RateLimiterOperator.of(rateLimiter); Object returnValue = proceedingJoinPoint.proceed(); return executeRxJava2Aspect(rateLimiterOperator, returnValue); }  @SuppressWarnings("unchecked") @Override boolean canHandleReturnType(Class returnType); @Override Object handle(ProceedingJoinPoint proceedingJoinPoint, RateLimiter rateLimiter,
        String methodName);  }