Improving test coverage on ServiceProvider