Add tests for algorithm class