" String text\n" +
"}";
GroovyClassLoader gcl = new GroovyClassLoader();
DefaultGrailsDomainClass bookClass = new DefaultGrailsDomainClass(gcl.parseClass(bookClassSource, "Book"));
Map constraints = bookClass.getConstrainedProperties();
Constrained p = (Constrained)constraints.get("title");
assertFalse("Title property should be required", p.isNullable());
p = (Constrained)constraints.get("description");
assertTrue("Description property should be optional", p.isNullable());
p = (Constrained)constraints.get("author");