test: use ostream in chat test