Oracle interview question

Q1. Write a code to print duplicate words in a string and write unit test cases for the code written.