Moved test code