Home » mocking

Tag Archives: mocking

How to use Spies in Mockito

Hello. In this tutorial, we will understand Spy in Mockito. As stubbing is now obsolete I will focus @Spy annotation in this tutorial. 1. Introduction Mockito is a popular framework used to mock the interfaces or classes so that dummy functionality can be added during the unit testing. It is a java based library that helps simplify the test-cases development ...

Read More »

How to use WireMock for Mocking

In this article we will learn about WireMock for mocking. WireMock is a simulator for HTTP-based APIs. Some might consider it a service virtualization tool or a mock server. It enables you to stay productive when an API you depend on doesn’t exist or isn’t complete. It supports testing of edge cases and failure modes that the real API won’t reliably produce. ...

Read More »