test: add apply_tag test