Amazon interview question

Write a function in any programming language you know to automate a test