That's not what this is testing (you're thinking `hasListener` (https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart-async.StreamController#id_hasListener).  `isClosed` needs to be tested or controller.add() will throw an exception.