GotoAction extends WebSymbolAction { public String getUrl() { return url; }  @Override ExecuteResult execute(WebSiteConnector connector); String getUrl(); @Transient @JsonIgnore String getURLWithVariableValues(); void setUrl(String url); Credentials getCredentials(); void setCredentials(Credentials credentials); String getBaseUrl(); void setBaseUrl(String baseUrl);  }
@Test public void testJSON() throws IOException { ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(g); GotoAction c2 = mapper.readValue(json, GotoAction.class); assertEquals(g.getUrl(), c2.getUrl()); }
@Test public void testJSONFile() throws IOException, URISyntaxException { ObjectMapper mapper = new ObjectMapper(); File file = new File(getClass().getResource("/actions/websymbolactions/GotoTestData.json").toURI()); WebSymbolAction obj = mapper.readValue(file, WebSymbolAction.class); assertTrue(obj instanceof GotoAction); GotoAction objAsAction = (GotoAction) obj; assertEquals("http: }