Converted inner class to a self contained stub.

The self contained stub can be used to test classes who depend on a real FileProvider.
Extracted stub FileProvider to new file.
Implemented write method in stub