A few weeks back I decided to write a blog post on how to efficiently test a Java application that uses the OpenDJ SDK to connect to an LDAP store (read post here). Since the scope was so big I had to break it down into two smaller posts. In this second part I will walk you through a sample maven-based application written in Java that uses Docker for integration testing.
The following diagram illustrates the application build process:
The sample app follows the standard Maven Build Life Cycle but it adds a couple of phases to it so that we can build, run and destroy a Docker container before the Integration Test Phase.