### Question:
ConfigDef extends WebHarvestPluginDef { public String getCharset() { return charset; } ConfigDef(final XmlNode xmlNode,
            final Class<? extends Processor> pluginClass); String getCharset(); ScriptingLanguage getScriptingLanguage();  }### Answer:
@Test public void getCharset() { nodeMock.addAttribute(CHARSET_ATTR, null, CHARSET); final String charset = new ConfigDef(nodeMock, null).getCharset(); assertNotNull("Charset is null.", charset); assertEquals("Unexpected charset.", CHARSET, charset); }
@Test public void getCharsetIfEmptyAttribute() { final String charset = new ConfigDef(nodeMock, null).getCharset(); assertNotNull("Default charset is null.", charset); assertEquals("Unexpected default charset.", "UTF-8", charset); }