Fix input stream for tests
Add helper for checking status results in tests