On testing separability restrictions with flexible functional forms