classUnderTest = new CloudsealAuthenticationProvider();
}
@Test
public void testSuccessfulAuthentication() throws VerificationException {
CloudsealPrincipal cloudsealPrincipal = new CloudsealPrincipal();
cloudsealPrincipal.setUsername("jdoe");
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())).thenReturn(cloudsealPrincipal);
classUnderTest.setCloudsealManager(cloudsealManager);
classUnderTest.setResponseValidator(authResponseValidator);