Capturing HTTP Requests with okhttp's MockWebServer.takeRequest (1 mins read).

How to use MockWebServer's takeRequest method to verify that HTTP request(s) are sent correctly.
Capturing HTTP Requests with okhttp's MockWebServer.takeRequest (1 mins read).

How to use MockWebServer's takeRequest method to verify that HTTP request(s) are sent correctly.
Integration Testing Your Spring WebClients with okhttp's MockWebServer (5 mins read).

How to write integration tests using MockWebServer with Spring Boot, for use with WebClients.
Week Notes 22#05 (2 mins read).
What happened in the week of 2022-01-31?
Generate Plain Old Java Objects (POJOs) from OpenAPI Model Definitions with Gradle (2 mins read).

How to generate POJOs really quickly and easily, with no manual work, using the Gradle openapi-generator Plugin.
Running Elements API Viewer to Verify Local OpenAPI/Swagger Documents (2 mins read).

How to run Elements UI locally to visualise OpenAPI documents.
I don't think you should be logging that? π³ (12 mins read).
Common pitfalls and dangerous things that you should be watching out for in your log messages.
Validating a MockMvc Response Has No Content Type (1 mins read).

How to validate, in a MockMvc test, whether the response has no content-type nor a body.
Replacing Text in Vim with the Output of a Command (1 mins read).

How to replace text under the cursor with the output of a command.
Integration Testing Your Spring RestTemplates with RestClientTest, using spring-test (8 mins read).

How to write integration tests using RestClientTest with Spring Boot, for use with RestTemplate and RestTemplateBuilders.
Running Swagger UI to Verify Local OpenAPI/Swagger Documents (2 mins read).

How to run Swagger UI locally to visualise OpenAPI documents.
Week Notes 22#04 (3 mins read).
What happened in the week of 2022-01-24?
Create Executables, not Shell Aliases or Functions (2 mins read).
Why I create standalone executable scripts instead of shell aliases or functions.
Announcing spring-content-negotiator, a Java Library for Content Negotiation with Spring (1 mins read).

Releasing a new library that can support content negotiation in Spring (Boot) applications, i.e. in Filters or ExceptionHandlers.
Getting Started with jMolecules and the (Classical) Onion Architecture, with a Spring Boot project (6 mins read).

A guided example of converting a Spring Boot project to the Onion Architecture pattern.
Week Notes 22#03 (4 mins read).
What happened in the week of 2022-01-17?
How to Create and Unit Test Java Bean Validation Annotations (12 mins read).

A guided example through what the different type of annotation ElementTypes are, with respect to Bean Validation, and how to write unit tests for them.
Codifying Your Technical / Architectural Standards with ArchUnit (7 mins read).

How to use ArchUnit to codify your technical standards to reduce code review requirements, and arrive at a more consistent codebase.
Appending to a Querystring using Go (1 mins read).

How to append query parameters in a URL in Go.
Don't Just String Append to a Querystring (1 mins read).
Why you shouldn't use concatenate strings together to append to a querystring.
Simplifying Spring (Boot) ExceptionHandlers with ResponseStatus Annotations (2 mins read).

How to use annotations to drive HTTP response codes from a Spring ExceptionHandler.
Use SLF4J, not Log4J, as Your Logging Interface (3 mins read).

Why we should be using the interface API for logging, rather than the underlying implementation's API.
Using the Facade Pattern to More Easily Test static or Complex Classes (2 mins read).

How to use the Facade design pattern to more easily test classes that are more complex than our tests need to understand.
Mocking void methods with Mockito (1 mins read).

How to Mock a void method with Mockito, for instance to throw an exception.
Thoughts on Social Media Anonymity (4 mins read).
My thoughts on the protection of social media anonymity.
Content Negotiation with Servlet Filter in Spring (Boot) (3 mins read).

How to perform content-negotiation in a Servlet Filter, to serve the correct representation of error to a consumer, based on the Accept header.
Content Negotiation with ControllerAdvice and ExceptionHandlers in Spring (Boot) (5 mins read).

How to perform content-negotiation in a Spring ExceptionHandler, to serve the correct representation of error to a consumer, based on the Accept header.
Error Handling in (Spring) Servlet Filters (2 mins read).

How to return HTTP errors when a Java Servlet fails with Spring (Boot).
Week Notes 22#02 (4 mins read).
What happened in the week of 2022-01-10?
'Knowing Me, Knowing You': Wiggly ears, custom pizzas and a burst appendix (5 mins read).
A copy of answers to the DSA's 'Knowing Me, Knowing You'.
Announcing uuid, a Java Library for UUID Validation (1 mins read).

Releasing a new library that can be used to validate UUIDs in Java.
Validating UUIDs with Regular Expressions in Java (1 mins read).

How to validate UUIDs and UUIDv4s in Java with a regex.
Auditing with Spring Boot Actuator (9 mins read).

How to use Spring Boot Actuator for your audit and business event logging needs.
Returning a Value, or a Default, From a Java Optional (1 mins read).

How to replace imperative code with a functional style, when returning a default value for a Java Optional.
Building an Automagically Updating Personal README for GitLab and GitHub (2 mins read).
Announcing the publishing of readme.jvt.me as well as automagically updating READMEs in my GitLab and GitHub profiles.
Adding both an ObjectMapper and a YAMLMapper to Spring Boot (2 mins read).

How to have an ObjectMapper and a YAMLMapper coexisting in a Spring Boot project's bean dependencies.
Week Notes 22#01 (4 mins read).
What happened in the week of 2022-01-03?
Testing Data Serialisation/Deserialization in Java (with Gson) (3 mins read).

How to validate your JSON types correctly serialise/deserialise when using the Gson library.
Improving Life-Work Balance on GitHub using per-Organisation Notification Settings (2 mins read).

How to set up per-organisation notification settings so your personal email doesn't get work-related notifications.
2021's Music In Review (1 mins read).
What music was I listening to in 2021?
Publishing to Maven Repositories with GitLab CI, with Signed Artefacts (4 mins read).

How to publish signed artefacts from a Gradle build to Maven repositories (such as Maven Central) when using GitLab CI.
Suppressing No pinentry warnings with GPG (in Automated Builds) (1 mins read).
How to get avoid No pinentry warnings when running GPG in automated build environments like CI/CD.
Week Notes 21#52 (3 mins read).
What happened in the week of 2020-12-27?
Gotcha: PicoContainer requires Zero-Argument Constructors (2 mins read).

A little gotcha around using PicoContainer (with Cucumber) where it may not be usable unless you have zero-arg constructors.
Using Dagger for Dependency Injection with Cucumber Tests (4 mins read).

How and why to add Dagger for your Cucumber tests' dependency injection.
Week Notes 21#51 (4 mins read).
What happened in the week of 2021-12-20?
Publishing a NPM Package to npmjs.com from GitLab CI (1 mins read).

How to publish an NPM package to the public NPM registry, using GitLab CI.
Announcing a new package: @jamietanna/spectral-test-harness (1 mins read).

Announcing a new NPM package for easier testing of Spectral API linting.
Test Driven Development for Your Spectral Rules, using Jest (7 mins read).

How to write unit tests for Spectral API linting, in a test-driven development fashion.
Autowiring your controllers automagically when using MockMVC and Spring Cloud Contract (2 mins read).

How to automagically set up your Spring controllers when using MockMVC with Spring Cloud Contract.
Decompiling Java Class Files On the Command-Line (2 mins read).

How to use the Fernflower decompiler on the command-line to decompile compiled Java classes.