Adding termination handlers to test.js and passing options in the factory method for MedeaTtl.