swapped round destructor code in unit test to make it pass on windows.