### Question:
AuthorisationServiceRemote implements AuthorisationServiceEncrypted { @Override public CmsResponse<AuthorisationScaApproachResponse> getAuthorisationScaApproach(String authorisationId) { try { ResponseEntity<AuthorisationScaApproachResponse> request = consentRestTemplate.getForEntity( authorisationRemoteUrls.getAuthorisationScaApproach(), AuthorisationScaApproachResponse.class, authorisationId); return CmsResponse.<AuthorisationScaApproachResponse>builder() .payload(request.getBody()) .build(); } catch (CmsRestException cmsRestException) { log.warn("Couldn't get SCA Approach by authorisation ID {}, HTTP response status: {}", authorisationId, cmsRestException.getHttpStatus()); } return CmsResponse.<AuthorisationScaApproachResponse>builder() .error(TECHNICAL_ERROR) .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 getAuthorisationScaApproach() { when(authorisationRemoteUrls.getAuthorisationScaApproach()).thenReturn(URL); AuthorisationScaApproachResponse controllerResponse = new AuthorisationScaApproachResponse(ScaApproach.REDIRECT); when(consentRestTemplate.getForEntity(URL, AuthorisationScaApproachResponse.class, AUTHORISATION_ID)) .thenReturn(new ResponseEntity<>(controllerResponse, HttpStatus.NO_CONTENT)); CmsResponse<AuthorisationScaApproachResponse> actualResponse = authorisationServiceRemote.getAuthorisationScaApproach(AUTHORISATION_ID); assertTrue(actualResponse.isSuccessful()); assertEquals(controllerResponse, actualResponse.getPayload()); }
@Test void getAuthorisationScaApproach_cmsRestException() { when(authorisationRemoteUrls.getAuthorisationScaApproach()).thenReturn(URL); AuthorisationScaApproachResponse controllerResponse = new AuthorisationScaApproachResponse(ScaApproach.REDIRECT); when(consentRestTemplate.getForEntity(URL, AuthorisationScaApproachResponse.class, AUTHORISATION_ID)) .thenThrow(CmsRestException.class); CmsResponse<AuthorisationScaApproachResponse> actualResponse = authorisationServiceRemote.getAuthorisationScaApproach(AUTHORISATION_ID); assertTrue(actualResponse.hasError()); assertEquals(CmsError.TECHNICAL_ERROR, actualResponse.getError()); }