Unittest improvements