A beam test of a prototype of the BESIII drift chamber in magnetic field