Test code rearranged.