Summary

This chapter covered legacy code, testing impediments, design for testability, and unit testing the legacy code with Mockito and PowerMock.

Now you should be able to write JUnit tests for legacy code with Mockito and PowerMock, refactor legacy code to make it unit testable, and design code to bypass the testing impediments.

The next chapter, Developing SOA with Mockito, will cover Service-oriented Architecture (SOA), web services, and how to unit test the REST- and SOAP-based web services with Mockito.

Get Mockito Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.