If they standardize mktemp ( https://www.austingroupbugs.net/view.php?id=1616 ) then I think you could just
TESTDIR=$(mktemp -d -p ${WHEREVER}) touch ${TESTDIR}/FOO ls ${TESTDIR}/foo && fail