Updated cuboidTest to be 3D compatible