Every three months, professional cyclists must notify the authorities of a time and place that they will be available for random doping testing every day in the coming three months. They log in to a system called ADAMS and input where they will be for one hour between 5am and 11pm every day in the 3 month period. They can change their location for any given day by email or text.

If they are found not to be available for testing at the given time and place, they get one 'strike'. Three 'strikes' in any rolling twelve month period means a ban from competition.

Lizzie Armitstead got her third 'strike' when she was not available for testing on 9 June 2016. A ban would have meant she couldn't compete at the Olympic Games (the Women's Road Race is this Sunday). She successfully appealed against a ban by convincing the Court of Arbitration for Sport that the testing official involved in the first 'strike' had not made 'reasonable' efforts to locate her. Apparently the testing official did not explain to hotel staff why he needed her hotel room number at 6am on 20 August 2015 and the hotel staff refused to give it to the tester. This meant that the first 'strike' was ruled to be void. So now there are only two valid 'strikes' against her name, and she is free to compete.

In a week where we should have been talking about what a brilliant year Armitstead has had on the bike, this whole affair will have been a major distraction for her and her team.

So what went wrong, and what lessons should we take from this fiasco?

As a lawyer I should not be expected to step onto a professional athlete's bike when the athlete is injured. Similarly, professional athletes cannot be expected to run legal challenges against missed tests themselves - and this story shows how important it is to make sure an athlete knows who to contact straight away – in this case the crucial moment was in August 2015.

Armitstead's words in the immediate aftermath are telling:

"I did think about it [challenging the first missed test]. But the reason I didn’t was because it was my first strike and it was very close to the world championships, so I was travelling to America. I also didn’t have the legal advice [my emphasis]. It felt very much them against me. I was very naive. I went ahead to the World Championships and I didn’t want the distraction."

It looks at the moment as though Armitstead will be able to compete in Rio. But in a world where sponsorship deals can account for the majority of an athlete's annual income, public image is crucial. If the first missed test had been challenged promptly in August 2015, we would probably be talking about what a brilliant year Armitstead has had so far on the bike instead of talking about the intricacies of the UCI's 'whereabouts system' – and for a professional athlete, that is an opportunity missed.