Added test coverage for the commands factory
[#59141414]