Added more test coverage for the batch api, replicated code from shell merging to errors