List of usage examples for org.apache.commons.httpclient HttpStatus SC_NOT_FOUND
int SC_NOT_FOUND
To view the source code for org.apache.commons.httpclient HttpStatus SC_NOT_FOUND.
Click Source Link
From source file:terrastore.integration.IntegrationTest.java
@Test public void testPutValueAndConditionallyGetNotFound() throws Exception { String bucket = UUID.randomUUID().toString(); TestValue value = new TestValue("value", 1); PutMethod putValue = makePutMethod(NODE1_PORT, bucket + "/value"); putValue.setRequestEntity(new StringRequestEntity(fromObjectToJson(value), "application/json", null)); HTTP_CLIENT.executeMethod(putValue); assertEquals(HttpStatus.SC_NO_CONTENT, putValue.getStatusCode()); putValue.releaseConnection();/*from w w w. j av a 2 s . c om*/ GetMethod getValue = makeGetMethodWithPredicate(NODE2_PORT, bucket + "/value", "jxpath:/stringField[.='wrong']"); HTTP_CLIENT.executeMethod(getValue); assertEquals(HttpStatus.SC_NOT_FOUND, getValue.getStatusCode()); getValue.releaseConnection(); }