legal officer exam