class TppServiceInternal implements TppService {

    @Override
    @Transactional
    public CmsResponse<Boolean> updateTppInfo(@NotNull TppInfo tppInfo) {
        Optional<TppInfoEntity> tppInfoEntityOptional = tppInfoRepository.findFirstByAuthorisationNumberAndInstanceId(tppInfo.getAuthorisationNumber(), serviceInstanceId);
        if (tppInfoEntityOptional.isEmpty()) {
            return CmsResponse.<Boolean>builder()
                       .payload(false)
                       .build();
        }
        TppInfoEntity tppInfoEntity = tppInfoEntityOptional.get();
        if (isRolesChanged(tppInfoEntity.getTppRoles(), tppInfo.getTppRoles())) {
            tppInfoEntity.setTppRoles(tppInfo.getTppRoles());
        }
        return CmsResponse.<Boolean>builder()
                   .payload(true)
                   .build();
    }

}