refactor test helper to accept multiple strings
refactor stream test to use test helper