By condensation of 1,2,3,4-tetrahydro-4,4-methylisochroman-1,3-dione (I) with 2-[4-(o-methoxyphenyl)piperazin-1-yl]ethylamine (II) in refluxing toluene .