If you have a def book = new Book(title:’Ala ma Kota’).save() and the constraints are violated by it, you’ll get a null returned from save() as a result. But how to find what is the problem with new Book()? Well, it’s a secret. Use book.errors.allErrors to get the list of errors and println on them. And by the way, they will not show up in the unit test stdout. See next bullet for this.
Hidden unit test error log
Unit tests send errors to a file well hidden in /target folder.
NCPDP format is in fact related to the EDIFACT standard. The EDIFACT standard is used mostly in the “rest of the world” whereas the X12 standard (each transaction type is designated with a number from 1-999) is used mostly in the U.S of A.