ClearAction extends WebSymbolAction { public WebElementLocator getNode() { return node; }  @Override ExecuteResult execute(WebSiteConnector connector); WebElementLocator getNode(); void setNode(WebElementLocator node);  }
@Test public void testJSON() throws IOException { ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(c); ClearAction c2 = mapper.readValue(json, ClearAction.class); assertEquals(c.getNode(), c2.getNode()); }
@Test public void testJSONFile() throws IOException, URISyntaxException { ObjectMapper mapper = new ObjectMapper(); File file = new File(getClass().getResource("/actions/websymbolactions/ClearTestData.json").toURI()); WebSymbolAction obj = mapper.readValue(file, WebSymbolAction.class); assertTrue(obj instanceof ClearAction); ClearAction objAsAction = (ClearAction) obj; assertEquals(node, objAsAction.getNode()); }