Add generate exists implementation.
Add generated exists tests.