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