Cartridge API has a method for reload Cartridge role ^1. See an example of test for module hotreload in ^2 and some explanation regarding hotreload in ^3.