Journal
Securing Java Apps With Spring Security TestModern microservices exchange credentials every millisecond, and a single misconfigured filter can expose customer data to the wrong tenant. Hardening an API…Practical ways to mock Amazon S3 in Java tests using S3MockStorage services like Amazon S3 are easy to use in production and painful to test. A code path that uploads reports, downloads configuration objects, or…Testing Java Collections and Streams with JMHJava collection and stream performance can look deceptively simple. A loop over an ArrayList, a lookup in a HashMap, or a filtered stream may appear easy to…Parameterized Tests in JUnit 5 with CSV and Method SourcesParameterized tests let one test method run repeatedly with different inputs. In JUnit 5, this is useful when the behaviour stays the same while values,…Using Arquillian For Reliable Java EE Integration TestsUnit tests are excellent at checking business rules in isolation, but they cannot prove that a Java EE application is correctly wired inside its runtime.…Testing REST APIs with Rest Assured and JSON Schema ValidationA REST API can return HTTP 200 and still deliver the wrong contract. A field may have changed from a number to a string, a required property may disappear, or…How to Integrate SonarQube for Code Coverage in CISonarQube gives a CI pipeline a consistent way to inspect code quality, security findings, duplication and test coverage. It does not run unit tests or…Testing SOAP web services with Spring-WS and MockWebServiceServerSOAP remains important in Australian enterprise software, even as REST and event-driven APIs receive most of the attention. Banks, insurers, government…Reliable Date and Time Tests in JavaTime-dependent code is easy to write and surprisingly difficult to test. A method that returns an expiry date, checks whether a booking is still valid, or…How to Write Tests for Spring Cloud Gateway Routes and FiltersSpring Cloud Gateway sits at an important boundary: it receives an HTTP request, decides where it should go, modifies it when necessary, and returns a response…