add mote test and unique entity constraint support