type fakeDecoder … func (f fakeDecoder) Decode() (action EventType, object runtime.Object, err error) { … } func (f fakeDecoder) Close() { … } type fakeReporter … func (f *fakeReporter) AsObject(err error) runtime.Object { … } func TestStreamWatcher(t *testing.T) { … } func TestStreamWatcherError(t *testing.T) { … } func TestStreamWatcherRace(t *testing.T) { … }