On AgencyBookmark
La quietud es la clave de Ryan HolidayNote
“Todos los problemas de la humanidad se deben a que el hombre es incapaz de permanecer callado en una habitación.” —Blaise Pascal, 1654.
Form Param Request Matching with WireMockTIL
The following is an example of how to use the withFormParam method to customize the response of a stub based on the value of a from parameter.
The @DirtiesContext Spring AnnotationTIL
In some test scenarios, a Spring Bean can become corrupted, causing other test scenarios to fail. To prevent this, we can annotate a test class or test method with @DirtiesContext, which tells the Spring Framework that the ApplicationContext is dirty, forcing the rebuilding of the Spring container and creating a new bean instances.
Working with Beans in Spring FrameworkTIL
A JavaBean is a standard Java class with getter/setter methods, a no-arg constructor, and is serializable. And a Spring Bean is any Java object managed by Spring and can be automatically injected into other components. The Spring Dependency injection allows Spring to manage and inject beans where needed.
March 27, 2025Note
I’ve been learning more about testing spring boot application. I had tested spring boot applications before, but I had only used some basic features. Now, I would like to go deeper to explore what interesting things can be done with it.
Validate the arguments passed to a methodTIL
The Mockito framework has the ArgumentCaptor class that can be use to validate the arguments passed to a mocked method.
Formatting JSON returned by cURL in the terminalTIL
Install the jq package:
macOS:
1brew install jq
Linux: