The European Union's top court dismissed complaints on Wednesday by Slovakia and Hungary about EU migration policy, upholding Brussels' right to force member states to take in asylum seekers.