public async Task Should_generate_lot_id_with_year_and_sequence_number()
        {
            using (var store = NewDocumentStore())
            {
                // Arrange
                using (var session = store.OpenAsyncSession())
                {
                    var lots = new List<Lot>
                    {
                        new Lot {Id = "lots/2015/1"},
                        new Lot {Id = "lots/2015/2"},
                        new Lot {Id = "lots/2015/3"}
                    };

                    await SaveEntities(lots, session);
                }

                using (var session = store.OpenAsyncSession())
                {
                    ILotsIdentityService lotsIdentityService = new LotsIdentityService(session);

                    // Act
                    const int year=2015;
                    var actual = await lotsIdentityService.GetNextId(year);

                    // Assert
                    actual.Should().Be("lots/2015/4");
                }
            }
        }
        public void  GetNextId_should_throw_exception_if_no_year_is_provided()
        {
            using (var store = NewDocumentStore())
            {
                using (var session = store.OpenAsyncSession())
                {
                    var lotsIdentityService = new LotsIdentityService(session);

                    const int year = 0;
                    Func<Task> act = async () => await lotsIdentityService.GetNextId(year);

                    act.ShouldThrow<ArgumentException>().WithMessage("Missing year");
                }
            }
        }
        public async Task GetNextId_should_generate_first_lot_id_if_no_lots_exist()
        {
            using (var store = NewDocumentStore())
            {
                using (var session = store.OpenAsyncSession())
                {
                    ILotsIdentityService lotsIdentityService = new LotsIdentityService(session);

                    // Act
                    const int year = 2015;
                    var actual = await lotsIdentityService.GetNextId(year);

                    // Assert
                    actual.Should().Be("lots/2015/1");
                }
            }
        }