On Isomorphism Testing of a Class of 2-Nilpotent Groups