complex restructuring unit tests