Pregunta de entrevista de Siemens

How would you test this function?