Back to Browse

Testing private methods with Powermock

20.8K views
Jul 19, 2021
7:34

Learn how you can test private methods within your application using JUnit. First we explore how the reflection utils from the Java library can be used to control and invoke a private method. Second, we use the Powermock library to condense a large portion of the test to just a single line. Comment, like and subscribe for more content on Java and software engineering. Visit my website to also see my blogs: https://aneesh.co.uk

Download

1 formats

Video Formats

360pmp410.4 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Testing private methods with Powermock | NatokHD