router and stream unit tests