Added tests for closed input stream.