Skip to content
  • Home
  • Blog
  • Talks
  • Projects
  • Contact

spiros.blog()

Spiros Tzavellas’s blog, mostly on software development and Java.

mockito

Testing JPA code with Mockito answers

Introduction In JPA when we want to insert an entity in the database we use the EntityManager.persist(..) method. In addition to saving the entity the persist method will also assign a value to the field of the entity annotated with the @Id annotation (according to the configured @GenerationType). This behaviour is convenient but can be […]

continue reading Testing JPA code with Mockito answers
Proudly powered by WordPress | Theme: Aventurine by Kelly Dwan & Mel Choyce.