improve instream related unit tests