Add factorial test