Tests on the ugly code