I means that how to setup fixture, so that System.out will return
mocked one?
On Sep 17, 6:47 pm, Johan Haleby <
johan.hal...@gmail.com> wrote:
> What do you mean by mocking static fields? Do you mean static methods?
>
> You can indeed mock static methods in PowerMock, seehttp://
code.google.com/p/powermock/wiki/MockStatic. How ever if you want to
> mock a static method in a system class (such as java.lang.System) you need
> to use this approach:
http://code.google.com/p/powermock/wiki/MockSystem.
>
> The latter doesn't work in PowerMock 1.2.5 for the Mockito extension though.
> Version 1.3 (not released yet) supports it so if you need this
> functionallity right now you should checkout and build PowerMock from trunk
> (using mvn install).
>
> /Johan
>