@Test void testToUserEmailNotVerified() { OidcUser oidcUser = mock(OidcUser.class); when(oidcUser.getEmail()).thenReturn("e@mail.com"); when(oidcUser.getEmailVerified()).thenReturn(false); OidcUserRequest oidcUserRequest = mock(OidcUserRequest.class); assertThrows( OidcUserEmailVerificationException.class, () -> oidcUserMapperImpl.toUser(oidcUser, oidcUserRequest)); }
@Transactional @Override public User toUser(OidcUser oidcUser, OidcUserRequest userRequest) { verifyOidcUser(oidcUser); return runAsSystem( () -> getUser(oidcUser, userRequest) .orElseGet(() -> createUserMapping(oidcUser, userRequest))); }
OidcUserMapperImpl implements OidcUserMapper { @Transactional @Override public User toUser(OidcUser oidcUser, OidcUserRequest userRequest) { verifyOidcUser(oidcUser); return runAsSystem( () -> getUser(oidcUser, userRequest) .orElseGet(() -> createUserMapping(oidcUser, userRequest))); } }
OidcUserMapperImpl implements OidcUserMapper { @Transactional @Override public User toUser(OidcUser oidcUser, OidcUserRequest userRequest) { verifyOidcUser(oidcUser); return runAsSystem( () -> getUser(oidcUser, userRequest) .orElseGet(() -> createUserMapping(oidcUser, userRequest))); } OidcUserMapperImpl(
      DataService dataService,
      OidcUserMappingFactory oidcUserMappingFactory,
      UserFactory userFactory); }
OidcUserMapperImpl implements OidcUserMapper { @Transactional @Override public User toUser(OidcUser oidcUser, OidcUserRequest userRequest) { verifyOidcUser(oidcUser); return runAsSystem( () -> getUser(oidcUser, userRequest) .orElseGet(() -> createUserMapping(oidcUser, userRequest))); } OidcUserMapperImpl(
      DataService dataService,
      OidcUserMappingFactory oidcUserMappingFactory,
      UserFactory userFactory); @Transactional @Override User toUser(OidcUser oidcUser, OidcUserRequest userRequest); }
OidcUserMapperImpl implements OidcUserMapper { @Transactional @Override public User toUser(OidcUser oidcUser, OidcUserRequest userRequest) { verifyOidcUser(oidcUser); return runAsSystem( () -> getUser(oidcUser, userRequest) .orElseGet(() -> createUserMapping(oidcUser, userRequest))); } OidcUserMapperImpl(
      DataService dataService,
      OidcUserMappingFactory oidcUserMappingFactory,
      UserFactory userFactory); @Transactional @Override User toUser(OidcUser oidcUser, OidcUserRequest userRequest);  }