Also test that the correct number of inputs were written to the stream.