ReferenceSchema extends Schema { public static Builder builder() { return new Builder(); } ReferenceSchema(final Builder builder); static Builder builder(); @Override boolean definesProperty(String field); Schema getReferredSchema(); void setReferredSchema(final Schema referredSchema); @Override boolean equals(Object o); @Override int hashCode(); @Override Map<String, Object> getUnprocessedProperties(); @Override String getTitle(); @Override String getDescription(); @Override SchemaLocation getLocation();  }
@Test public void constructorMustRunOnlyOnce() { Builder builder = ReferenceSchema.builder(); Assert.assertSame(builder.build(), builder.build()); }
@Test(expected = IllegalStateException.class) public void validateThrowsExc_IfNoReferredSchemaIsSet() { ReferenceSchema subject = ReferenceSchema.builder().build(); subject.validate(null); }