added test for Algorithm constructor