test for redirect factory