Corrects paths that do not start with a slash or end with a slash
Mocks WriteDataSource with the correct values

Mocks WriteDataSource with the correct values for the dataSourcePath
argument.