List<RemoteRepository> repositories = resolver.getRemoteRepositories();
assertEquals(2, repositories.size());
// first repository is http://user:password@somehost/path/to/repo
RemoteRepository repo = repositories.get(0);
assertEquals("host1", repo.getHost());
assertEquals("user", repo.getAuthentication().getUsername());
assertEquals("password", repo.getAuthentication().getPassword());
// second repository is http://host2/path/to/repo@snapshots
repo = repositories.get(1);
assertEquals("host2", repo.getHost());
assertNull(repo.getAuthentication());
assertTrue("@snapshots enables snapshots", repo.getPolicy(true).isEnabled());
}