Added an encoding test.