RestrictionImpl implements Restriction { @NotNull @Override public RestrictionDefinition getDefinition() { return definition; } RestrictionImpl(@NotNull PropertyState property, @NotNull RestrictionDefinition def);  RestrictionImpl(@NotNull PropertyState property, boolean isMandatory); @NotNull @Override RestrictionDefinition getDefinition(); @NotNull @Override PropertyState getProperty(); @Override int hashCode(); @Override boolean equals(Object o);  }
@Test public void testGetDefinition() { assertEquals(new RestrictionDefinitionImpl(name, type, isMandatory), restriction.getDefinition()); }
@Test public void testGetName() { assertEquals(name, restriction.getDefinition().getName()); }
@Test public void testGetRequiredType() { assertEquals(Type.NAME, restriction.getDefinition().getRequiredType()); }
@Test public void testIsMandatory() { assertTrue(restriction.getDefinition().isMandatory()); }