IDEX-1530: Add test and simplified existed