@Test public void testCopy() throws CopyNotSupportedException { Schema schema = new Schema.Parser().parse(AVRO_SCHEMA); CopyableSchema copyableSchema = new CopyableSchema(schema); Schema copy = copyableSchema.copy(); Assert.assertEquals(schema, copy); copy.addProp("foo", "bar"); Assert.assertNotEquals(schema, copy); }
@Override public Schema copy() throws CopyNotSupportedException { return new Schema.Parser().setValidate(false).parse(this.schema.toString()); }
CopyableSchema implements Copyable<Schema> { @Override public Schema copy() throws CopyNotSupportedException { return new Schema.Parser().setValidate(false).parse(this.schema.toString()); } }
CopyableSchema implements Copyable<Schema> { @Override public Schema copy() throws CopyNotSupportedException { return new Schema.Parser().setValidate(false).parse(this.schema.toString()); } CopyableSchema(Schema schema); }
CopyableSchema implements Copyable<Schema> { @Override public Schema copy() throws CopyNotSupportedException { return new Schema.Parser().setValidate(false).parse(this.schema.toString()); } CopyableSchema(Schema schema); @Override Schema copy(); }
CopyableSchema implements Copyable<Schema> { @Override public Schema copy() throws CopyNotSupportedException { return new Schema.Parser().setValidate(false).parse(this.schema.toString()); } CopyableSchema(Schema schema); @Override Schema copy();  }