Java
Mocking with (and without) Spring Boot
Mockito is a very popular library to support testing. It allows us to replace real objects with “mocks”, i.e. with objects that are not the real thing and whose behavior we can control within our test.
Read moreBean Validation Anti-Patterns
Bean Validation is the de-facto standard for implementing validation logic in the Java ecosystem and it’s a great tool to have around.
Read morePollution-Free Dependency Management with Gradle
Remember the days when we had to manually download every single JAR file that our project needed to run? And not only the JAR files we directly depended upon, mind you, but even those JAR files that our dependencies and our dependencies' dependencies needed to work!
Read moreMaven Scopes and Gradle Configurations Explained
table th:first-of-type { width: 40%; } One of the key features of a build tool for Java is dependency management.
Read more5 Reasons Why Business Exceptions Are a Bad Idea
I recently had a conversation about exception handling. I argued that business exceptions are a good thing because they clearly mark the possible failures of a business method.
Read more3 Steps to Fix NoSuchMethodErrors and NoSuchMethodExceptions
A NoSuchMethodError occurs when we’re calling a method that does not exist at runtime. The method must have existed at compile time, since otherwise the compiler would have refused to compile the class calling that method with an error: cannot find symbol.
Read more