Skip to content

Instantly share code, notes, and snippets.

@tonvanbart
tonvanbart / House.java
Last active July 12, 2024 01:21
How to capture constructor arguments while Mockito is mocking the constructed class. Not pleasant but it works.
class Dog {
String name;
public Dog(String name) {
this.name = name;
}
public String bark() {
return name + " says: Woof!";