public void InputStreamSink_should_return_less_than_was_expected_when_data_source_has_provided_some_but_not_enough_data()
{
this.AssertAllStagesStopped(() =>
{
var inputStream = Source.Single(_byteString).RunWith(StreamConverters.AsInputStream(), _materializer);
var arr = new byte[_byteString.Count + 1];
inputStream.Read(arr, 0, arr.Length).Should().Be(arr.Length - 1);
inputStream.Close();
ByteString.Create(arr).ShouldBeEquivalentTo(_byteString.Concat(ByteString.Create(new byte[] { 0 })));
}, _materializer);
}