Skip to content

Instantly share code, notes, and snippets.

@DominikMostek
Created July 19, 2022 07:44
Show Gist options
  • Save DominikMostek/9f92bc3f994aaa84d082844d4520aa15 to your computer and use it in GitHub Desktop.
Save DominikMostek/9f92bc3f994aaa84d082844d4520aa15 to your computer and use it in GitHub Desktop.
@Test
public void bar() {
Geometry mock = mock(Geometry.class);
doReturn(12.3).when(mock).tan(pi/2);
}
interface Geometry {
/**
* Must return null when x = pi/2
**/
Double tan(double x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment