Fix DocumentCommandHandler unit tests in cmv4 branch

This is for #6718.

cc @njx