mysql class and test