@Test(expected = IllegalStateException.class)
public void getAssertion_UnwantedAuthenticationType_IllegalStateException() {

    Authentication authentication = new UsernamePasswordAuthenticationToken("casuser", "Mellon");
    SecurityContextHolder.getContext().setAuthentication(authentication);
    AssertionProvider provider = new SecurityContextHolderAssertionProvider();
    provider.getAssertion();
}