Add stream utilities for use in tests