Added integration test for batch with docdesc
Throw invalidfragment if there are cycles