anchor.diff:    test('conflicting transitions', () {
       var controller = new StreamController.broadcast(sync: true);
   
  -    var machine = new Machine();
  +    try {
  +      var machine = new Machine();
   
  -    var stateA = machine.newState('a');
  -    var stateB = machine.newState('b');
  -    var stateC = machine.newState('c');
  +      var stateA = machine.newState('a');
  +      var stateB = machine.newState('b');
  +      var stateC = machine.newState('c');
   
  -    stateA.onStream(controller.stream, (value) => stateB.enter());
  -    stateA.onStream(controller.stream, (value) => stateC.enter());
  +      stateA.onStream(controller.stream, (value) => stateB.enter());
  +      stateA.onStream(controller.stream, (value) => stateC.enter());
   
  -    machine.start();
  -    controller.add('*');
  -    expect(machine.current, stateB);
  +      machine.start();
  +      controller.add('*');
  +      expect(machine.current, stateB);
  +    } finally {
  +      controller.close();
  +    }
     });
     test('future transitions', () {
       var machine = new Machine();
  
positive.code: 
  void main() {
    group('stream transitions', () {
      var controllerA = new StreamController.broadcast(sync: true);
      var controllerB = new StreamController.broadcast(sync: true);
      var controllerC = new StreamController.broadcast(sync: true);
  
      var machine = new Machine();
  
      var stateA = machine.newState('a');
      var stateB = machine.newState('b');
      var stateC = machine.newState('c');
  
      stateA.onStream(controllerB.stream, (event) => stateB.enter());
      stateA.onStream(controllerC.stream, (event) => stateC.enter());
  
      stateB.onStream(controllerA.stream, (event) => stateA.enter());
      stateB.onStream(controllerC.stream, (event) => stateC.enter());
  
      stateC.onStream(controllerA.stream, (event) => stateA.enter());
      stateC.onStream(controllerB.stream, (event) => stateB.enter());
  
      test('string', () {
        expect(machine.toString(), 'Instance of \'Machine\'[null]');
  
negative.code:     var stateA = machine.newState('a');
      var stateB = machine.newState('b');
  
      stateA.onFuture(new Future.delayed(new Duration(milliseconds: 100)),
          (value) => fail('should never be called'));
      stateA.onFuture(
          new Future.delayed(new Duration(milliseconds: 10), () => 'something'),
          expectAsync1((String value) {
        expect(log, isEmpty);
        expect(value, 'something');
        expect(machine.current, stateA);
        log.add('a');
        stateB.enter();
      }));
      stateB.onFuture(new Future.delayed(new Duration(milliseconds: 1)),
          expectAsync1((value) {
        expect(log, ['a']);
        expect(value, isNull);
      }));
  
      machine.start();
    });
  