Added test for the :encode parameter.