test exception when duplicate identifier detected.