two-way streaming and tests