# Java Testing Notes

## Java Testing

- [Java Testing](https://notes.tejpratapsingh.com/java-testing/java-testing.md)
- [Mockito](https://notes.tejpratapsingh.com/java-testing/mockito.md): Mocking framework for unit tests in Java
- [Mockito.mock()](https://notes.tejpratapsingh.com/java-testing/mockito/mockito.mock.md): Creates a mock of any non final class
- [Mockito.spy()](https://notes.tejpratapsingh.com/java-testing/mockito/mockito.spy.md)
- [Mockito.verify()](https://notes.tejpratapsingh.com/java-testing/mockito/mockito.verify.md): Verify interactions with your mock
- [Mockito.mockStatic()](https://notes.tejpratapsingh.com/java-testing/mockito/mockito.mockstatic.md): Mock static methods without PowerMock
- [ArgumentMatcher](https://notes.tejpratapsingh.com/java-testing/mockito/argumentmatcher.md): Match arguments passed in a method of your mock
- [ArgumentCaptor](https://notes.tejpratapsingh.com/java-testing/mockito/argumentcaptor.md): Can do everything argument matcher can and still more
- [PowerMockito](https://notes.tejpratapsingh.com/java-testing/powermockito.md)
- [Why we need PowerMock?](https://notes.tejpratapsingh.com/java-testing/powermockito/why-we-need-powermock.md)
- [PowerMockRunner](https://notes.tejpratapsingh.com/java-testing/powermockito/powermockrunner.md): You must annotate each class you test with PowerMockRunner
- [PrepareForTest](https://notes.tejpratapsingh.com/java-testing/powermockito/preparefortest.md): Mark this class for bytecode manipulation
- [Understanding @PrepareForTest](https://notes.tejpratapsingh.com/java-testing/powermockito/preparefortest/understanding-preparefortest.md): PrepareForTest is very powerful tool that unlocks class manipulation capabilities by modifying class to byte code level.
- [SuppressStaticInitializationFor](https://notes.tejpratapsingh.com/java-testing/powermockito/suppressstaticinitializationfor.md)
- [PowerMockito.suppress()](https://notes.tejpratapsingh.com/java-testing/powermockito/powermockito.suppress.md)
- [PowerMockito.stub()](https://notes.tejpratapsingh.com/java-testing/powermockito/powermockito.stub.md)
- [PowerMockito.replace()](https://notes.tejpratapsingh.com/java-testing/powermockito/powermockito.replace.md)
- [PowerMockito.whenNew()](https://notes.tejpratapsingh.com/java-testing/powermockito/powermockito.whennew.md)
- [Limitation of PowerMockito.whenNew()](https://notes.tejpratapsingh.com/java-testing/powermockito/powermockito.whennew/limitation-of-powermockito.whennew.md): Why Powermockito.whenNew() is not enough.
- [Whitebox.invokeMethod()](https://notes.tejpratapsingh.com/java-testing/powermockito/whitebox.invokemethod.md)
- [Whitebox.setInternalState()](https://notes.tejpratapsingh.com/java-testing/powermockito/whitebox.setinternalstate.md)
- [Whitebox.getInternalState()](https://notes.tejpratapsingh.com/java-testing/powermockito/whitebox.getinternalstate.md)
- [Tips](https://notes.tejpratapsingh.com/java-testing/tips.md): Pages with tips to test your code effectively
- [How to test ViewModel and LiveData](https://notes.tejpratapsingh.com/java-testing/tips/how-to-test-viewmodel-and-livedata.md): Test your async code build on top of androidx arch.
