refactored commandline tests