Refactoring code in RegisterCommands helper
fixed typo in ApplicationTest