Restructured unit test