All the examples provided for mockedStatic method is for method without parameters. Is there a way to mock methods with parameters.
examples provided: https://javadoc.io/static/org.mockito/mockito-core/3.4.6/org/mockito/Mockito.html#static_mocks
mocked.when(Foo::method).thenReturn("bar");
assertEquals("bar", Foo.method());
mocked.verify(Foo::method);
}
What I want: I tried below and it does not work.
mocked.when(Foo.methodWithParams("SomeValue"))