Add test for algorithms