Here is an interesting post about how to add integration tests and configure its dependencies in a Gradle build.