Trump tests judge with attacks on prosecutor, court