### Question:
AuthorisationServiceRemote implements AuthorisationServiceEncrypted { @Override public CmsResponse<Boolean> updateScaApproach(String authorisationId, ScaApproach scaApproach) { try { Boolean body = consentRestTemplate.exchange(authorisationRemoteUrls.updateScaApproach(), HttpMethod.PUT, null, Boolean.class, authorisationId, scaApproach) .getBody(); return CmsResponse.<Boolean>builder() .payload(body) .build(); } catch (CmsRestException cmsRestException) { log.warn("Couldn't update SCA approach {} by authorisation ID {}, HTTP response status: {}", scaApproach, authorisationId, cmsRestException.getHttpStatus()); } return CmsResponse.<Boolean>builder() .payload(false) .build(); }  @Override CmsResponse<CreateAuthorisationResponse> createAuthorisation(AuthorisationParentHolder parentHolder, CreateAuthorisationRequest request); @Override CmsResponse<Authorisation> getAuthorisationById(String authorisationId); @Override CmsResponse<Authorisation> updateAuthorisation(String authorisationId, UpdateAuthorisationRequest request); @Override CmsResponse<Boolean> updateAuthorisationStatus(String authorisationId, ScaStatus scaStatus); @Override CmsResponse<List<String>> getAuthorisationsByParentId(AuthorisationParentHolder parentHolder); @Override CmsResponse<ScaStatus> getAuthorisationScaStatus(String authorisationId, AuthorisationParentHolder parentHolder); @Override CmsResponse<Boolean> isAuthenticationMethodDecoupled(String authorisationId, String authenticationMethodId); @Override CmsResponse<Boolean> saveAuthenticationMethods(String authorisationId, List<CmsScaMethod> methods); @Override CmsResponse<Boolean> updateScaApproach(String authorisationId, ScaApproach scaApproach); @Override CmsResponse<AuthorisationScaApproachResponse> getAuthorisationScaApproach(String authorisationId);  }### Answer:
@Test void updateScaApproach() { when(authorisationRemoteUrls.updateScaApproach()).thenReturn(URL); ScaApproach scaApproach = ScaApproach.REDIRECT; when(consentRestTemplate.exchange(URL, HttpMethod.PUT, null, Boolean.class, AUTHORISATION_ID, scaApproach)) .thenReturn(new ResponseEntity<>(true, HttpStatus.NO_CONTENT)); CmsResponse<Boolean> actualResponse = authorisationServiceRemote.updateScaApproach(AUTHORISATION_ID, scaApproach); assertTrue(actualResponse.isSuccessful()); assertTrue(actualResponse.getPayload()); }
@Test void updateScaApproach_cmsRestException() { when(authorisationRemoteUrls.updateScaApproach()).thenReturn(URL); ScaApproach scaApproach = ScaApproach.REDIRECT; when(consentRestTemplate.exchange(URL, HttpMethod.PUT, null, Boolean.class, AUTHORISATION_ID, scaApproach)) .thenThrow(CmsRestException.class); CmsResponse<Boolean> actualResponse = authorisationServiceRemote.updateScaApproach(AUTHORISATION_ID, scaApproach); assertTrue(actualResponse.isSuccessful()); assertFalse(actualResponse.getPayload()); }