Pregunta de entrevista de Hewlett Packard Enterprise | HPE

How would you implement and write tests for this method