With the release of Jetpack Paging, loading RecyclerView’s data in batches has become pretty fun and easy. Still, part of our job is not only to implement cool things but to write tests to ensure feature sustainability. The question in using Jetpack Paging is how easy it is to unit test our functionality.
The very concept of evolutionary software architecture is based on “listening” intently to the system’s needs. As the system changes every day, so do its needs. Identifying the points in which architectural changes should be applied is key to the system’s success.
One of the five design principles in S.O.L.I.D. is Dependency Inversion, where the general idea of this principle is the decoupling between the high-level modules and low-level modules. One way to apply this principle is by using the Dependency Injection design pattern. The Dependency Injection makes your code more testable, more maintainable, and of course, more readable.