Assert Stream.Write called correctly at right time