When we unit test Spring MVC applications, we test each layer separately from the others. We create mock implementations, typically using Mockito, for each layer’s dependencies, then we simulate the ...
This repository contains the complete source code for the project, including the application files, configuration, Docker setup, and tests. You can clone it and follow along step by step. In the ...
A monthly overview of things you need to know as an architect or aspiring architect. Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with ...
This workshop should take about 2 hours, depending on how deep you want to go into each topic. This workshop is setup with a number of steps that can be run through. Each step is in a branch, so to ...
Classes, methods and properties that were deprecated in Spring Boot 1.3 have been removed in this release. Please ensure that you aren’t calling deprecated methods before upgrading. Log4j 1 support ...
Mocking external API calls is a common practice in integration or end to end testing because it allows developers to isolate their code from outside. This also helps, if we are using paid APIs and ...
A monthly overview of things you need to know as an architect or aspiring architect. Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with ...
最近在做某个项目的时候一直使用 @MockBean 来解决单元测试中 Mock 类装配到被测试类的问题。这篇文章主要介绍了 @MockBean 的使用例子以及不使用 @MockBean 而使用@SpyBean 的情景和原因。 文章中的所有代码均为 Kotlin 语言,与 Java 略有不同。但是 Kotlin 的语法比较 ...