Microsoft Interview Question

reverse a string of words. and how do u test your program?