To identify the magnet, repulsion (like poles of two magnets repel) is the only test which will let you know whether the given rod is an iron rod or a bar magnet. Because a magnet attracts an iron object and unlike poles of magnets also attract each other.