Added ref-counting base test class.