How do I create a query which takes certain time to execute?

I have configured statement_timeout=1000 in Postgres DB

I am accessing a DB table using a JDBC driver from a java application. JDBC driver will throw an exception if the statement times out. I have a logic that will get executed if the exception is thrown.

Now I want to test this functionality, is there a way to make a query not return the result within 1000 millsecs?