Test base class

So many code was repeated again and again.
Hate it...