There's no getApplicationDocumentsDirectory implementation on the test environment. So you should set a mock handler using setMockMethodCallHandler. This answer might be helpful.
getApplicationDocumentsDirectory
setMockMethodCallHandler