SelectAction extends FillAction { public SelectByType getSelectBy() { return selectBy; }  @Override ExecuteResult execute(WebSiteConnector connector); SelectByType getSelectBy(); void setSelectBy(SelectByType selectBy);  }
@Test public void testJSON() throws IOException { ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(s); SelectAction f2 = mapper.readValue(json, SelectAction.class); assertEquals(s.getNode(), f2.getNode()); assertEquals(s.getValue(), f2.getValue()); assertEquals(s.getSelectBy(), f2.getSelectBy()); }
@Test public void testJSONFile() throws IOException, URISyntaxException { ObjectMapper mapper = new ObjectMapper(); File file = new File(getClass().getResource("/actions/websymbolactions/SelectTestData.json").toURI()); WebSymbolAction obj = mapper.readValue(file, WebSymbolAction.class); assertTrue(obj instanceof SelectAction); SelectAction objAsAction = (SelectAction) obj; assertEquals(node, objAsAction.getNode()); assertEquals("Lorem Ipsum", objAsAction.getValue()); assertEquals(SelectAction.SelectByType.TEXT, objAsAction.getSelectBy()); }