Skip to content

Instantly share code, notes, and snippets.

@DominikMostek
Created July 19, 2022 07:44
Show Gist options
  • Save DominikMostek/c815b8f8b2e80e2f59e860b8006bbccf to your computer and use it in GitHub Desktop.
Save DominikMostek/c815b8f8b2e80e2f59e860b8006bbccf to your computer and use it in GitHub Desktop.
@Test
public void bar() {
ITest mock = mock(ITest.class);
doReturn(new BigDecimal(5)).when(mock).foo(1);
mock.foo(1L);
}
interface ITest {
String foo(Number x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment