def test_get_generation_delta_limit(self):
        """Test get generation delta."""
        root_id = self.root.id
        # get the generation before we add all the nodes
        last_gen = self.vgw._get_user_volume().generation
        dir1 = self.vgw.make_subdirectory(root_id, 'dir1')
        file1 = self.vgw.make_file(root_id, 'file1.txt')
        dir2 = self.vgw.make_subdirectory(dir1.id, 'dir2')
        file2 = self.vgw.make_file(dir1.id, 'file2.mp3')
        dir3 = self.vgw.make_subdirectory(dir2.id, 'dir3')
        file3 = self.vgw.make_file(dir2.id, 'file3.mp3')
        self.vgw.delete_node(dir3.id)
        self.vgw.delete_node(file3.id)
        # get the first set (just one)
        delta = list(self.vgw.get_generation_delta(last_gen, 1))
        self.assertEqual(len(delta), 1)
        self.assertTrue(dir1 in delta)
        # get the next set, should (the next 3)
        last_gen = delta[-1].generation
        delta = list(self.vgw.get_generation_delta(last_gen, 3))
        self.assertEqual(len(delta), 3)
        self.assertTrue(file1 in delta)
        self.assertTrue(dir2 in delta)
        self.assertTrue(file2 in delta)
        last_gen = delta[-1].generation
        delta = list(self.vgw.get_generation_delta(last_gen, 100))
        self.assertEqual(len(delta), 2)
        self.assertTrue(dir3 in delta)
        self.assertTrue(file3 in delta)