Add template test related to #1599