Added tests to verify that value encoding is set based on Content-Type header.