Tagged articles
2 articles
Page 1 of 1
Programmer DD
Programmer DD
Jan 1, 2021 · Backend Development

How TestableMock Empowers Java Unit Testing of Private Members and Void Methods

TestableMock is a Java unit‑testing helper that lets developers access private fields and methods, quickly mock any method call, and effectively test void methods by providing annotations and utility classes, with detailed code examples and usage guidelines for both Java and Kotlin projects.

JavaMockingPrivate Access
0 likes · 12 min read
How TestableMock Empowers Java Unit Testing of Private Members and Void Methods
FunTester
FunTester
Aug 5, 2020 · Backend Development

Mocking Void Methods with Mockito: A Complete Step‑by‑Step Guide

This article explains how to use Mockito's doNothing, doAnswer, doThrow, and doCallRealMethod to mock void methods in Java, demonstrating parameter verification, argument capture, and real‑method invocation with detailed code examples and reasoning behind each approach.

JUnitJavaMocking
0 likes · 6 min read
Mocking Void Methods with Mockito: A Complete Step‑by‑Step Guide