@Test public void testPolymorphism() throws IOException { Job job; job = new ExtendedJob1(); job.setId("extendedjob-1"); ((ExtendedJob1)job).setAliases(new String[]{"a1", "a2"}); testRoundTrip(job); job = new ExtendedJob2(); job.setId("extendedjob-2"); ((ExtendedJob2)job).setFeatures(new String[]{"f1", "f2"}); testRoundTrip(job); job = new ExtendedJob1(); job.setId("extendedjob-3"); ((ExtendedJob1)job).setAliases(new String[]{"a1", "a2"}); testRoundTrip(job); }
public void setId(String id) { this.id = id; }
Job { public void setId(String id) { this.id = id; } }
Job { public void setId(String id) { this.id = id; } protected  Job(); @JsonCreator  Job(
      @JsonProperty("id") String id,
      @JsonProperty("configuration") Properties configuration,
      @JsonProperty("metrics") Map<String, Number> metrics
  ); }
Job { public void setId(String id) { this.id = id; } protected  Job(); @JsonCreator  Job(
      @JsonProperty("id") String id,
      @JsonProperty("configuration") Properties configuration,
      @JsonProperty("metrics") Map<String, Number> metrics
  ); String getId(); void setId(String id); Properties getConfiguration(); void setConfiguration(Properties configuration); Map<String, Number> getMetrics(); void setMetrics(Map<String, Number> metrics); @Override int hashCode(); @Override boolean equals(Object obj); String toJson(); static Job fromJson(String json); }
Job { public void setId(String id) { this.id = id; } protected  Job(); @JsonCreator  Job(
      @JsonProperty("id") String id,
      @JsonProperty("configuration") Properties configuration,
      @JsonProperty("metrics") Map<String, Number> metrics
  ); String getId(); void setId(String id); Properties getConfiguration(); void setConfiguration(Properties configuration); Map<String, Number> getMetrics(); void setMetrics(Map<String, Number> metrics); @Override int hashCode(); @Override boolean equals(Object obj); String toJson(); static Job fromJson(String json);  }