Pergunta de entrevista da empresa AJ Bell

inheritance vs composition, which would you use and why? Have you used contract testing before?