added encoding tests and etag test
fixed bug on official site example