Implemented pre_term_timeout with test