There are only two parts to the hazard system, the can and the switch. A power lead goes to the can, and then to the switch. When the switch is pressed, it allows a path to both left and right indicators.
A quick check of the switch is to turn on the bike, select an indicator (left or right) and both will flash. if no double flash then the switch is damaged (probably dirty contacts , can be cleaned but the chance of wrecking the switch is high)
This assumes the hazards arent working when ignition is off ( you should hear the flasher can and see the flashes if all is working)