restructuring unit tests