Add test to check for an invalid mode