@Test public void writeExtension() { DatarefExtension datarefExtension = new DatarefExtension(); datarefExtension.setDataref(URI.create("http: CloudEvent event = CloudEventBuilder.v1() .withId("aaa") .withSource(URI.create("http: .withType("example") .withExtension(datarefExtension) .build(); assertThat(event.getExtension(DatarefExtension.DATAREF)) .isEqualTo(URI.create("http: }
public void setDataref(URI dataref) { this.dataref = dataref; }
DatarefExtension implements Extension { public void setDataref(URI dataref) { this.dataref = dataref; } }
DatarefExtension implements Extension { public void setDataref(URI dataref) { this.dataref = dataref; }  }
DatarefExtension implements Extension { public void setDataref(URI dataref) { this.dataref = dataref; }  URI getDataref(); void setDataref(URI dataref); @Override void readFrom(CloudEventExtensions extensions); @Override Object getValue(String key); @Override Set<String> getKeys(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
DatarefExtension implements Extension { public void setDataref(URI dataref) { this.dataref = dataref; }  URI getDataref(); void setDataref(URI dataref); @Override void readFrom(CloudEventExtensions extensions); @Override Object getValue(String key); @Override Set<String> getKeys(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); static final String DATAREF; }