MuleSoft interview question

How did you implement this?