The Bank 1 Sensor 2, is after catalytic converter; while, it does play a role in the computer adjusting the engine, the Bank 1 Sensor 1, plays a more important role. If you do decide to replace the 02 sensor; it is recommended to only use oem genuine Bosch sensors, which VW uses from the factory and are supplied, when buying genuine VW parts.
You can look up the correct sensor; by using the Bosch online catalog here:
For testing, you can follow the procedures; outlined, in this service manual link below (be sure, to click "next"; to advance to all the pages/testing procedures):
Oxygen Sensor (O2S) after Three Way Catalytic Converter (TWC) -G130-, 50Nm
Location: behind Three Way Catalytic Converter (TWC)
New Beetle GLS L4-1.8L Turbo (AWV) (2001) > Volkswagen Workshop Manuals > Powertrain Management > Ignition System > Sensors and Switches - Ignition System > Camshaft Position Sensor > Component Information > Locations
sensor and wiring testing procedures:
New Beetle GLS L4-1.8L Turbo (AWV) (2001) > Volkswagen Workshop Manuals > Powertrain Management > Computers and Control Systems > Oxygen Sensor > Component Information > Testing and Inspection > Oxygen Sensor & O2 Sensor Regulation After Converter, Check > Page 3979