Add test for writing message
Introduce InputStream->select()

- introduce select method (use read with callback)
- use select in confirm
- adjust test
Improve testConfirm (use mocka, test more throughout)