Implemented retainAll and added unit testing for it