Amazon Interview Question

write a function to check whether there exists duplicated words in a string. Show your test case.