Added encoding test