test: Rewrite "TestCommandSelect" by using mock