Unit test for SPARK-3697.