@startuml
'https://plantuml.com/sequence-diagram

autonumber

Actor Customer as c
Participant ViewLicenseControler as vlc
Participant LicenseService as ls
Participant CarRepository as cr
database Database as db

c --->vlc:View Services (String VIN)
activate vlc
vlc -> ls:getLicenses(String VIN): List<Licenses>
activate ls
ls -> cr: getLicensesFromCar(String VIN): Car
activate cr
cr->db: getCarFromDb(vin)
activate db
db-->cr: Return Car from Query
deactivate db
cr-->ls: return Car
deactivate cr
loop for(License l : Car.getLicenseList())
    ls->ls: addServiceToServiceList()
    end

ls-->vlc: return List<Services>
deactivate ls
vlc-->c: View Services List<Services>
deactivate vlc

@enduml