Add unit-tests for the new API endpoint allowing to change critpath