Polish test code a bit