Add tests for TextResource implementations

- fixed NPE in StringBackedTextResource
- removed incorrect @Nullable annotation in TemporaryFileProvider