Military experts say the test is a warning that space may rapidly become weaponized and that the United States needs to invest to protect an advantage it has long held.