Add unit test for executeCommand