(DefaultDevice) internalDevice.getDevice();
defaultDevice.setPolicyValue(DevicePolicyConstants.DEFAULT_OUTPUT_CHARSET,
deviceCharset);
defaultDevice.setPolicyValue(DevicePolicyConstants.FORCED_OUTPUT_CHARSET,
forcedCharset);
HttpHeaders rHeaders = HttpServletFactory.
getDefaultInstance().getHTTPHeaders(request);
String charset = selector.selectCharset(rHeaders,
(DefaultDevice) context.getDevice().getDevice());
if (expected != null) {
assertEquals("Expected value should match", expected, charset);