final MavenHostedRepository remoteRepository = remoteRepositories().get(MavenHostedRepository.class,
REMOTE_REPOSITORY_ID);
remoteRepository.disableBrowsing().save();
// create local/central proxying remote/central
final MavenProxyRepository localRepository = localRepositories()
.create(MavenProxyRepository.class, LOCAL_REPOSITORY_ID).asProxyOf(remoteRepository.contentUri())
.doNotDownloadRemoteIndexes().withRepoPolicy("RELEASE").save();
waitForRemoteToSettleDown();
waitForLocalToSettleDown();
assertThat(LOCAL_REPOSITORY_ID + " should not be autoblocked",
!localRepositories().get(MavenProxyRepository.class, LOCAL_REPOSITORY_ID).status().isAutoBlocked());
localRepository.refresh();
assertThat(LOCAL_REPOSITORY_ID + " should not be autoblocked",
!localRepositories().get(MavenProxyRepository.class, LOCAL_REPOSITORY_ID).status().isAutoBlocked());
}