The exam tests to see if you're a bona fide social worker. That is, in essence, do you understand the Code and how to put it into action?
Learning the NASW Code of Ethics is fairly simple: Read it. Then read it again. As often as you need to to get it known.