### Question:
FlashTagHandler extends AbstractTagHandler { SwfObjectConfig getSwfConfig(Element tag, TemplateProcessor processor) { Map<String, String> params = getAllAttributesLowerCase(tag, processor); return (SwfObjectConfig) beanConverter.convertToObject(new JSONObject(params), SwfObjectConfig.class); } @Inject  FlashTagHandler(BeanJsonConverter beanConverter, FeatureRegistry featureRegistry,
      @Named("shindig.template-rewrite.extension-tag-namespace") String namespace,
      @Named("shindig.flash.min-version") String flashMinVersion); void process(Node result, Element tag, TemplateProcessor processor);  }### Answer:
@Test public void testConfigCreation() throws Exception { Document doc = documentProvider.createDocument(null, null, null); Element tag = doc.createElement("test"); tag.setAttribute("id", "myflash"); tag.setAttribute("class", "stylish"); tag.setAttribute("swf", "http: tag.setAttribute("width", "100px"); tag.setAttribute("height", "200px"); tag.setAttribute("name", "myflashname"); tag.setAttribute("play", "onclick"); tag.setAttribute("menu", "true"); tag.setAttribute("scale", "exactfit"); tag.setAttribute("wmode", "transparent"); tag.setAttribute("devicefont", "true"); tag.setAttribute("swliveconnect", "true"); tag.setAttribute("allowscriptaccess", "samedomain"); tag.setAttribute("quality", "autohigh"); tag.setAttribute("salign", "tl"); tag.setAttribute("bgcolor", "#77ff77"); tag.setAttribute("allowfullscreen", "true"); tag.setAttribute("allownetworking", "none"); tag.setAttribute("flashvars", "a=b&c=d"); FlashTagHandler.SwfObjectConfig config = handler.getSwfConfig(tag, processor); assertEquals("myflash", config.id); assertEquals("stylish", config.clazz); assertEquals(config.swf, Uri.parse("http: assertEquals("100px", config.width); assertEquals("200px", config.height); assertEquals("myflashname", config.name); assertEquals(FlashTagHandler.SwfObjectConfig.Play.onclick, config.play); assertEquals(Boolean.TRUE, config.menu); assertEquals(FlashTagHandler.SwfObjectConfig.Scale.exactfit, config.scale); assertEquals(FlashTagHandler.SwfObjectConfig.WMode.transparent, config.wmode); assertEquals(Boolean.TRUE, config.devicefont); assertEquals(Boolean.TRUE, config.swliveconnect); assertEquals(FlashTagHandler.SwfObjectConfig.ScriptAccess.samedomain, config.allowscriptaccess); assertNull(config.loop); assertEquals(FlashTagHandler.SwfObjectConfig.Quality.autohigh, config.quality); assertEquals(FlashTagHandler.SwfObjectConfig.SAlign.tl, config.salign); assertEquals("#77ff77", config.bgcolor); assertEquals(Boolean.TRUE, config.allowfullscreen); assertEquals(FlashTagHandler.SwfObjectConfig.NetworkAccess.none, config.allownetworking); assertEquals("a=b&c=d", config.flashvars); }