Coding forest

A blog about code and stuff

about me

Hi I'm Juan! I'm a software developer from Argentina 🇦🇷living in the Bay Area. On this blog I share the things I learn on software development and other related topics.

Hope you like it! ❤️

Using PowerMock + TestNG to Mock a Static Class

 This week I needed to test a class that depended on a method from an static class. I saw we were using PowerMock and thought to myself: “Well this sounds pretty common, I bet it’s easy to accomplish”. But of course I ran into half a dozen issues before I was able to make it work. Here’s my two cents to make your experience easier than mine.

written in java, mocking, testing Read on →