Restructuring unit tests