Porting test to use testpackage - #547