US President Donald Trump's troop deployments will be further tested in two court hearings in different US states.