@Test(expected = HsaServiceException.class) public void testLoginPUErrorThrowsException() { reset(puService); when(puService.getPerson(any(Personnummer.class))).thenReturn(PersonSvar.error()); testee.loadUserBySAML(new SAMLCredential(mock(NameID.class), assertionPrivatlakare, REMOTE_ENTITY_ID, LOCAL_ENTITY_ID)); }
@Override public Object loadUserBySAML(SAMLCredential samlCredential) { try { return createUser(samlCredential); } catch (Exception e) { if (e instanceof AuthenticationException) { throw e; } LOG.error("Error building user with error message {}", e.getMessage()); throw new HsaServiceException("privatlakare, ej hsa", e); } }
ElegWebCertUserDetailsService extends BaseWebCertUserDetailsService implements SAMLUserDetailsService { @Override public Object loadUserBySAML(SAMLCredential samlCredential) { try { return createUser(samlCredential); } catch (Exception e) { if (e instanceof AuthenticationException) { throw e; } LOG.error("Error building user with error message {}", e.getMessage()); throw new HsaServiceException("privatlakare, ej hsa", e); } } }
ElegWebCertUserDetailsService extends BaseWebCertUserDetailsService implements SAMLUserDetailsService { @Override public Object loadUserBySAML(SAMLCredential samlCredential) { try { return createUser(samlCredential); } catch (Exception e) { if (e instanceof AuthenticationException) { throw e; } LOG.error("Error building user with error message {}", e.getMessage()); throw new HsaServiceException("privatlakare, ej hsa", e); } }  }
ElegWebCertUserDetailsService extends BaseWebCertUserDetailsService implements SAMLUserDetailsService { @Override public Object loadUserBySAML(SAMLCredential samlCredential) { try { return createUser(samlCredential); } catch (Exception e) { if (e instanceof AuthenticationException) { throw e; } LOG.error("Error building user with error message {}", e.getMessage()); throw new HsaServiceException("privatlakare, ej hsa", e); } }  @Override Object loadUserBySAML(SAMLCredential samlCredential); }
ElegWebCertUserDetailsService extends BaseWebCertUserDetailsService implements SAMLUserDetailsService { @Override public Object loadUserBySAML(SAMLCredential samlCredential) { try { return createUser(samlCredential); } catch (Exception e) { if (e instanceof AuthenticationException) { throw e; } LOG.error("Error building user with error message {}", e.getMessage()); throw new HsaServiceException("privatlakare, ej hsa", e); } }  @Override Object loadUserBySAML(SAMLCredential samlCredential);  }