Apply test codes