### Question:
JackrabbitHotfolder extends ServerHotfolder implements
		Hotfolder, Serializable { @Override public boolean exists(URI uri) throws IOException { HeadMethod headMethod = new HeadMethod(uri.toString()); try { headMethod.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(10, false)); int responseCode = client.executeMethod(headMethod); if (responseCode == HttpStatus.SC_OK) { return true; } return false; } finally { headMethod.releaseConnection(); } }  void configureConnection(String serverUrl, String username, String password); @Override void upload(URI fromLocal, URI toRemote); @Override void download(URI fromRemote, URI toLocal); @Override void delete(URI uri); @Override boolean exists(URI uri); @Override long getUsedSpace(URI uri); @Override byte[] getResponse(URI uri);  }### Answer:
@Test public void uriShouldExist() throws HttpException, IOException, URISyntaxException { when(httpClientMock.executeMethod(any(HeadMethod.class))).thenReturn(200); assertTrue("URI must exist", jackrabbitSut.exists(new URI("http: }
@Test public void uriShouldNotExist() throws HttpException, IOException, URISyntaxException { when(httpClientMock.executeMethod(any(HeadMethod.class))).thenReturn(401); assertFalse("URI must not exist", jackrabbitSut.exists(new URI("http: }