Adds override for override functions (onEnter, onExit) in cpp-tests.