Same way as you Mock any any interface. But, beware, you eventually will end up mocking the whole AEM (or it will feel like it).
In many cases, the Sling Test framework provides a better solution. Take a look at http://sling.apache.org/documentation/tutorials-how-tos/testing-sling-based-applications.html
"it felt safer to test it in a realistic situation rather than mock everything." - Could not agree more.
/Ove