Kotlin does many wonderful things for you. For example, the
create helpful constructors, and automatically implement
hashCode in a reasonable
Similarly, JPA works magic—expecially in the context of Spring Data.
So how do I test that my Kotlin entity is correctly annotated for JPA? The simplest thing would be a "round trip" test create an entity, save it to a database, read it back, and confirm the object has the same values. Let's start with a simple entity, and the simplest possible test:
@Entity data class Greeting( val content:…