Java's Hidden Gems: Tools and Libraries by Johan Janssen

Discover 12 lesser-known Java tools and libraries for testing, performance, security & code generation. Learn practical use cases to enhance your development workflow.

Key takeaways
  • ArcUnit allows verifying application architecture rules and dependencies between layers/packages in unit tests to prevent circular dependencies and architectural violations

  • Test Containers provides an easy way to spin up Docker containers (databases, message queues, etc.) for integration testing, removing the need for local installations

  • GraphQL can be used as an alternative to multiple REST endpoints when clients need to filter/query specific data fields, reducing over-fetching of data

  • Java Poet enables dynamic Java code generation through a fluent API, useful for creating classes, methods and other code artifacts programmatically

  • JReleaser automates release processes including changelog generation, Docker publishing, and other release-related tasks

  • Mutation testing (PITest) helps verify test quality by making small code changes and ensuring tests catch the mutations

  • Gatling provides performance testing capabilities with a Java DSL for load testing scenarios and detailed reporting

  • TimeFault helps optimize scheduling and resource allocation problems through constraint-based planning

  • Renovate automates dependency updates by creating pull requests when new versions are available

  • JDK Mission Control and Flight Recorder provide deep runtime insights into application performance, garbage collection, and memory usage

  • OWASP Dependency Check scans dependencies for known security vulnerabilities

  • Awaitility simplifies testing of asynchronous code by providing better ways to handle waits and assertions