test codes and skeleton for Mat class.