Journal
Testing Java Annotation Processors with Compile TestingAnnotation processors are compiler plugins that inspect Java source while javac builds it. A processor can validate a custom annotation, report a diagnostic,…Benchmarking Java regular expressions with Australian inputsRegular expressions often appear small enough to treat as free CPU work. In Java, however, a concise pattern can trigger repeated backtracking, while a larger…How to test Java spell checkers and NLP libraries with sample dataSpell checking looks simple until a checker meets “colour”, “defence”, a product code or an Australian street name. The practical side of how to write tests…Testing Java JMX beans with JUnit and MBeans ServerJava Management Extensions (JMX) gives Java applications a standard way to expose managed attributes and operations to monitoring tools. For teams in Sydney…Testcontainers for Cassandra and MongoDB in Java Integration TestsIntegration tests that touch a real datastore tend to be where a project's build becomes unpredictable. A service that writes to Cassandra or MongoDB needs…Testing the Java Preferences API with temporary nodesjava.util.prefs gives Java applications a hierarchical place to store small configuration values, user choices and machine-specific settings. A preferences…Testing Java OSGi bundles with the PAX Exam frameworkOSGi turns a Java application into a set of modules called bundles, each with its own lifecycle, class loader and declared package dependencies. A unit test…Testing Java mail services with GreenMail and SMTPIntegration tests for Java mail services should verify the boundary where application code hands a message to an SMTP server. A test that only asserts a…Realistic test data with Java FakerReliable automated tests need data that behaves like production without carrying production risk. Fixed names and addresses can conceal formatting, encoding,…Testing Exception Behaviour in Java Stream CollectorsJava stream pipelines make aggregation compact, but a custom collector can turn a terminal operation into a failure point. Testing Java exception handling in…