# Mockito.mockStatic()

Now with Mockito 3, you can mock Classes with static methods.

Here is an example:

```java
try (MockedStatic<Foo> dummyStatic = Mockito.mockStatic(ClassName.class)) {
    dummyStatic.when(() -> ClassName.method("param1"))
               .thenReturn("someValue");
    // when
    System.out.println(ClassName.method("param1"));
    //then
    dummyStatic.verify(
            () -> ClassName.method("param1"),
            times(1), 
    );
}
```
