@Test public void handleDispatch() { dispatchManager.handleDispatch(store, () -> "STUB"); InOrder order = Mockito.inOrder(middleware1, middleware2, middleware3, reducerDispatch); order.verify(middleware1, times(1)).dispatch(any(), any(), any()); order.verify(middleware2, times(1)).dispatch(any(), any(), any()); order.verify(middleware3, times(1)).dispatch(any(), any(), any()); order.verify(reducerDispatch, times(1)).dispatch(any()); dispatchManager = new DispatchManager<>(reducerDispatch, null); Mockito.verify(reducerDispatch, times(1)).dispatch(any()); }
public void handleDispatch(@NonNull Store<S, A> store, @NonNull A action) { handle(startNode, store, action); }
DispatchManager { public void handleDispatch(@NonNull Store<S, A> store, @NonNull A action) { handle(startNode, store, action); } }
DispatchManager { public void handleDispatch(@NonNull Store<S, A> store, @NonNull A action) { handle(startNode, store, action); } DispatchManager(@NonNull Dispatcher<A> dispatchToReducer, @Nullable Middleware<S, A>[] middlewareList); }
DispatchManager { public void handleDispatch(@NonNull Store<S, A> store, @NonNull A action) { handle(startNode, store, action); } DispatchManager(@NonNull Dispatcher<A> dispatchToReducer, @Nullable Middleware<S, A>[] middlewareList); void handleDispatch(@NonNull Store<S, A> store, @NonNull A action); Middleware<S, A>[] getMiddleware(); }
DispatchManager { public void handleDispatch(@NonNull Store<S, A> store, @NonNull A action) { handle(startNode, store, action); } DispatchManager(@NonNull Dispatcher<A> dispatchToReducer, @Nullable Middleware<S, A>[] middlewareList); void handleDispatch(@NonNull Store<S, A> store, @NonNull A action); Middleware<S, A>[] getMiddleware();  }