He isn’t going to lose the case. When a President declares an emergency, it is not subject to Judicial review by these inferior courts. The SCOTUS will rule for Trump because if they don’t, the lower inferior courts become President. That’s called Tyranny.