unit testing content encoding