You don't. But given a large enough group of people, some will contract the infection "organically." So some people get a vaccine and some get a placebo and then you check back in years later and see if the vaccine group has a lower infection rate.
Phase 1 trials are for safety, not efficacy -- they don't care if the participants are infected with HIV, because they only want to make sure that the vaccine doesn't hurt them.
In this case, they seem to be testing the blood for markers that should indicate an ability to repulse an HIV infection. Not the most scientifically informative experiment one can imagine, but also pretty straightforward ethically.