On one hand it is definitely bad to cheat at exams or assessments.
But.
I am a software developer and I *live* on the internet. I would say that probably the single most important skill for a software developer is being able to investigate a problem, look at documentation, previous examples or somewhat similar code and being able to learn from it and construct a working solution to the problem. Put me on the spot and ask me what the correct syntax is for a given operation in a random language and you'll be lucky to get a sensible response. Either I can bring it to mind, or I'll rely on intellisense backed up by Stack Overflow / MSDN et cetera. The key is knowing how to find the answer and use it.
I once failed an interview because I didn't know, on paper, the various methods in StringBuilder. They didn't appreciate the answer "I'd Google it".
If I were to recommend anything to the exam board, it would be to set a problem that didn't have a simple pre-built solution. Like, asking a student to build a set of objects to do certain tasks in a coursework-style timescale, then have them demonstrate how these objects can be used in a short assessment period. If the student copied the code, then it's highly likely they won't have a clue how to use it. If they did copy it and they *do* know how to use it, then congrats! That's how real software development works. Extra marks.