Fixed code coverage.
- Added test for case when idp metadata is still valid and shouldn't be reloaded.
- Simplified redundant conditions in IdentityProvider.