Fix deprecations in command unit test