Some time ago, we had a look at the mocking framework Mockito. Today I want to introduce the competitor JMockit and try to answer the question why and when to use one framework over the other.
Java, Web and Mobile
Unit testing is essential to produce good software. As a unit test is intended to cover only a very small piece of code we need to mock out other components. This post provides an introduction into the widely used mocking framework Mockito.
In addition to my first liquibase post I give you some best practice in order to integrate liquibase in JUnit using hibernate JPA to ensure same datamodel during unit test and other stages. Use the power of mockito to setup your JUnit test class and inject your entity manager.