@Test void login() { when(userMgmtRestClient.authorise(any(), any(), eq(UserRoleTO.CUSTOMER))).thenReturn(getLoginResponse()); SCALoginResponseTO result = service.login(LOGIN, PIN); assertThat(result).isEqualTo(getLoginResponse().getBody()); }
@Override public SCALoginResponseTO login(String login, String pin) { try { return userMgmtRestClient.authorise(login, pin, UserRoleTO.CUSTOMER).getBody(); } catch (FeignException e) { log.error(LOGIN_ERROR_MSG_LOGGER, login, e.status(), e.getMessage()); throw AuthorizationException.builder() .devMessage(String.format(LOGIN_ERROR_MSG, login)) .errorCode(AuthErrorCode.LOGIN_FAILED) .build(); } }
AuthorizationServiceImpl implements AuthorizationService { @Override public SCALoginResponseTO login(String login, String pin) { try { return userMgmtRestClient.authorise(login, pin, UserRoleTO.CUSTOMER).getBody(); } catch (FeignException e) { log.error(LOGIN_ERROR_MSG_LOGGER, login, e.status(), e.getMessage()); throw AuthorizationException.builder() .devMessage(String.format(LOGIN_ERROR_MSG, login)) .errorCode(AuthErrorCode.LOGIN_FAILED) .build(); } } }
AuthorizationServiceImpl implements AuthorizationService { @Override public SCALoginResponseTO login(String login, String pin) { try { return userMgmtRestClient.authorise(login, pin, UserRoleTO.CUSTOMER).getBody(); } catch (FeignException e) { log.error(LOGIN_ERROR_MSG_LOGGER, login, e.status(), e.getMessage()); throw AuthorizationException.builder() .devMessage(String.format(LOGIN_ERROR_MSG, login)) .errorCode(AuthErrorCode.LOGIN_FAILED) .build(); } }  }
AuthorizationServiceImpl implements AuthorizationService { @Override public SCALoginResponseTO login(String login, String pin) { try { return userMgmtRestClient.authorise(login, pin, UserRoleTO.CUSTOMER).getBody(); } catch (FeignException e) { log.error(LOGIN_ERROR_MSG_LOGGER, login, e.status(), e.getMessage()); throw AuthorizationException.builder() .devMessage(String.format(LOGIN_ERROR_MSG, login)) .errorCode(AuthErrorCode.LOGIN_FAILED) .build(); } }  @Override SCALoginResponseTO login(String login, String pin); @Override String resolveAuthConfirmationCodeRedirectUri(String redirectUri, String code); }
AuthorizationServiceImpl implements AuthorizationService { @Override public SCALoginResponseTO login(String login, String pin) { try { return userMgmtRestClient.authorise(login, pin, UserRoleTO.CUSTOMER).getBody(); } catch (FeignException e) { log.error(LOGIN_ERROR_MSG_LOGGER, login, e.status(), e.getMessage()); throw AuthorizationException.builder() .devMessage(String.format(LOGIN_ERROR_MSG, login)) .errorCode(AuthErrorCode.LOGIN_FAILED) .build(); } }  @Override SCALoginResponseTO login(String login, String pin); @Override String resolveAuthConfirmationCodeRedirectUri(String redirectUri, String code);  }