### Question:
AuthorisationServiceRemote implements AuthorisationServiceEncrypted { @Override public CmsResponse<ScaStatus> getAuthorisationScaStatus(String authorisationId, AuthorisationParentHolder parentHolder) { String parentId = parentHolder.getParentId(); try { ResponseEntity<ScaStatus> request = consentRestTemplate.getForEntity( authorisationRemoteUrls.getAuthorisationScaStatus(), ScaStatus.class, parentHolder.getAuthorisationType(), parentId, authorisationId); return CmsResponse.<ScaStatus>builder() .payload(request.getBody()) .build(); } catch (CmsRestException cmsRestException) { log.info("Couldn't get SCA Status by parent ID {} and authorisation ID {}, HTTP response status: {}", parentId, authorisationId, cmsRestException.getHttpStatus()); } return CmsResponse.<ScaStatus>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 getAuthorisationScaStatus() { when(authorisationRemoteUrls.getAuthorisationScaStatus()).thenReturn(URL); AuthorisationParentHolder authorisationParentHolder = new AuthorisationParentHolder(AUTHORISATION_TYPE, PARENT_ID); ScaStatus controllerResponse = ScaStatus.RECEIVED; when(consentRestTemplate.getForEntity(URL, ScaStatus.class, AUTHORISATION_TYPE, PARENT_ID, AUTHORISATION_ID)) .thenReturn(new ResponseEntity<>(controllerResponse, HttpStatus.OK)); CmsResponse<ScaStatus> actualResponse = authorisationServiceRemote.getAuthorisationScaStatus(AUTHORISATION_ID, authorisationParentHolder); assertTrue(actualResponse.isSuccessful()); assertEquals(controllerResponse, actualResponse.getPayload()); }
@Test void getAuthorisationScaStatus_cmsRestException() { when(authorisationRemoteUrls.getAuthorisationScaStatus()).thenReturn(URL); AuthorisationParentHolder authorisationParentHolder = new AuthorisationParentHolder(AUTHORISATION_TYPE, PARENT_ID); when(consentRestTemplate.getForEntity(URL, ScaStatus.class, AUTHORISATION_TYPE, PARENT_ID, AUTHORISATION_ID)) .thenThrow(CmsRestException.class); CmsResponse<ScaStatus> actualResponse = authorisationServiceRemote.getAuthorisationScaStatus(AUTHORISATION_ID, authorisationParentHolder); assertTrue(actualResponse.hasError()); assertEquals(CmsError.TECHNICAL_ERROR, actualResponse.getError()); }