### Question:
Xs2aAuthorisationService { public boolean saveAuthenticationMethods(String authorisationId, List<AuthenticationObject> methods) { CmsResponse<Boolean> response = authorisationServiceEncrypted.saveAuthenticationMethods(authorisationId, xs2aAuthenticationObjectToCmsScaMethodMapper.mapToCmsScaMethods(methods)); return response.isSuccessful() && response.getPayload(); }  Optional<CreateAuthorisationResponse> createAuthorisation(CreateAuthorisationRequest request, String parentId, AuthorisationType authorisationType); Optional<Authorisation> getAuthorisationById(String authorisationId); void updateScaApproach(String authorisationId, ScaApproach scaApproach); boolean saveAuthenticationMethods(String authorisationId, List<AuthenticationObject> methods); boolean isAuthenticationMethodDecoupled(String authorisationId, String authenticationMethodId); void updateAuthorisationStatus(String authorisationId, ScaStatus scaStatus); Optional<AuthorisationScaApproachResponse> getAuthorisationScaApproach(String authorisationId); Optional<List<String>> getAuthorisationSubResources(String parentId, AuthorisationType authorisationType); CmsResponse<Authorisation> updateAuthorisation(UpdateAuthorisationRequest request, String authorisationId); Optional<ScaStatus> getAuthorisationScaStatus(String authorisationId, String parentId, AuthorisationType authorisationType);  }### Answer:
@Test void saveAuthenticationMethods() { List<AuthenticationObject> methods = Collections.singletonList(new AuthenticationObject()); List<CmsScaMethod> cmsScaMethods = xs2aAuthenticationObjectToCmsScaMethodMapper.mapToCmsScaMethods(methods); when(authorisationServiceEncrypted.saveAuthenticationMethods(AUTHORISATION_ID, cmsScaMethods)) .thenReturn(CmsResponse.<Boolean>builder().payload(Boolean.TRUE).build()); assertTrue(authorisationService.saveAuthenticationMethods(AUTHORISATION_ID, methods)); }
@Test void saveAuthenticationMethods_isNotSuccessful() { List<AuthenticationObject> methods = Collections.singletonList(new AuthenticationObject()); List<CmsScaMethod> cmsScaMethods = xs2aAuthenticationObjectToCmsScaMethodMapper.mapToCmsScaMethods(methods); when(authorisationServiceEncrypted.saveAuthenticationMethods(AUTHORISATION_ID, cmsScaMethods)) .thenReturn(CmsResponse.<Boolean>builder().payload(Boolean.FALSE).build()); assertFalse(authorisationService.saveAuthenticationMethods(AUTHORISATION_ID, methods)); }