unittest restructuring