@Test
public void testUnsuccessfulAuthentication() throws VerificationException {
CloudsealAssertionAuthenticationToken token = new CloudsealAssertionAuthenticationToken("http://localhost:8080/saml/sp", "123", "SAMLResponse");
when(cloudsealManager.getPublicKey()).thenReturn(publicKey);
when(authResponseValidator.validateAuthResponse(any(PublicKey.class), anyString(), anyString(), anyString())).thenThrow(new VerificationException("oops"));
classUnderTest.setCloudsealManager(cloudsealManager);
classUnderTest.setResponseValidator(authResponseValidator);
try {
classUnderTest.authenticate(token);