fix unit test broken to context.opt interface change