anchor.diff:  
   class ConnectionMock extends Mock implements Connection {}
   class IdGeneratorMock extends Mock implements IdGenerator {}
  +class CommunicatorMock extends Mock implements Communicator {}
   
   void main() {
     group("Subscriber", () {
  
positive.code:     ConnectionMock connection;
      IdGeneratorMock idGenerator;
      Subscription months;
      Data january;
      Future futureData = new Future.value({});
  
      setUp(() {
        connection = new ConnectionMock();
        connection.when(callsTo('sendRequest')).alwaysReturn(futureData);
        idGenerator = new IdGeneratorMock();
      });
  
      tearDown(() {
        months.stopGettingData();
      });
  
      test("assign id to data.", () {
        // given
        idGenerator.when(callsTo('next')).alwaysReturn('prefix-1');
        months = new Subscription('months', connection, 'author', idGenerator);
        january = new Data.from({'name': 'January', 'order': 1});
  
        // when
        months.collection.add(january);
  
        // then
        expect(months.collection.first['_id'], equals('prefix-1'));
      });
  
  //    test("request initial data and handle response.", () {
  //      // given
  //      idGenerator.when(callsTo('next')).alwaysReturn('prefix-1');
  //      connection = new ConnectionMock();
  //      futureData = new Future.value({'data': [{'_id': '21',
  //        'name': 'February', 'order': 2}]});
  //      connection.when(callsTo('sendRequest'))
  //        .alwaysReturn(futureData);
  //
  //      // when
  //      months = new Subscription('months', connection, 'author', idGenerator);
  //
  //      // then
  //      var request = connection.getLogs().first.args[0]();
  //      expect(request.type, equals("sync"));
  //      expect(request.args, equals({"action": "get_data",
  //                                   "collection": "months"}));
  //
  //      expect(months.collection.length, equals(1));
  //      expect(months.collection.first.containsValue("February"), isTrue);
  //    });
  
      test("send add-request.", () {
        // given
        idGenerator.when(callsTo('next')).alwaysReturn('prefix-1');
        months = new Subscription('months', connection, 'author', idGenerator);
        january = new Data.from({'name': 'January', 'order': 1});
  
        // when
        months.collection.add(january);
  
        // then
  
negative.code:     test("send remove-request.", () {
        // given
        idGenerator.when(callsTo('next')).alwaysReturn('prefix-1');
        january = new Data.from({'_id': '12', 'name': 'January', 'order': 1});
        collection.add(january);
        months = new Subscription.config('months', collection, connection,
            communicator, 'author', idGenerator);
  
        // when
        months.start();
        months.collection.remove(january);
  
        // then
        var request = connection.getLogs().first.args[0]();
        expect(request.type, equals("sync"));
        expect(request.args, equals({"action": "remove", "collection": "months",
                                     "_id": "12", "author": "author"}));
      });
  
    });
  }
  