Fixed issue #30

Added an extra conditional to prevent using MockProvider if it's an inner class, and added a test to verify that the new version works correctly. This fixes issue #30
What order do you want exactly?

1. Module
2. Inner classes (does this order matter?)
3. Test methods

Yes?