type fakeReader … func (r *fakeReader) Read([]byte) (int, error) { … } type fakeWriter … func (*fakeWriter) Write([]byte) (int, error) { … } type fakeStreamCreator … var _ … func (f *fakeStreamCreator) CreateStream(headers http.Header) (httpstream.Stream, error) { … } func TestV2CreateStreams(t *testing.T) { … } func TestV2ErrorStreamReading(t *testing.T) { … }