Make inputexception message tests more robust