documenting and testing the encoding decorator