Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The first step in JPA development is mapping your objects to tables. Although JPA does a good job of providing default values for most mappings, it’s still necessary to tune it up, typically through the use of Java annotations. And as you annotate the persistent classes, you want to be sure they’re correctly mapped, so you write test cases that exercise the mapping alone (without worrying about how your final code is going to call the JPA API).
You might be wondering whether these tests are necessary. What could be wrong?