*
* @throws Exception error
*/
@Test(expected = MetadataProviderException.class)
public void testMissingSP() throws Exception {
MetadataManager manager = context.getBean("metadata", MetadataManager.class);
while (manager.getProviders().size() > 0) {
manager.removeMetadataProvider(manager.getProviders().iterator().next());
manager.refreshMetadata();
}
expect(request.isSecure()).andReturn(false);
expect(request.getAttribute(org.springframework.security.saml.SAMLConstants.LOCAL_ENTITY_ID)).andReturn(null);
replyMock();
samlContext = contextProvider.getLocalAndPeerEntity(request, response);