[BZ-967441] adding test case demonstrating that temporal queries are working as expected
(cherry picked from commit f6f4543efb073c0f00cdfed45c57ef799f06e16b)