Pergunta de entrevista da empresa Xero

Explain why need to write test in this code