/** * Verify that a remote answering with '401' will still be auto-blocked. * * <p>This test will change repo status to auto blocked. */ @Test(dependsOnMethods = "testNoAutoblockOn403") public void testAutoblockOn401() throws Exception { startErrorServer(401); try { downloadArtifact(GavUtil.newGav("g", "a", "401"), "target"); } catch (IOException e) { // expected, remote will answer with 401 } RepositoryStatusResource status = getStatus(); assertThat(ProxyMode.valueOf(status.getProxyMode()), is(ProxyMode.BLOCKED_AUTO)); }