return " %$&+,/:;=?@<>#%".indexOf(ch) >= 0;
}
@Test
public void testCRUD() throws Exception {
RequestExecutor request;
// The needed Web resources to GET from.
executor.execute(builder.buildGetRequest(SESSION_URI).withHeader("Accept", KRFormat.TURTLE))
.assertStatus(200);
log.info("Request: " + SESSION_URI + " ... DONE");
String tempScopeUri = SESSION_URI + "/" + getClass().getCanonicalName() + "-"
+ System.currentTimeMillis();
// Scope should not be there
request = executor.execute(builder.buildGetRequest(tempScopeUri)
.withHeader("Accept", KRFormat.TURTLE));
request.assertStatus(404);
log.info("Request: " + tempScopeUri + " (should return 404) ... DONE");
// Create scope
executor.execute(builder.buildOtherRequest(new HttpPut(builder.buildUrl(tempScopeUri))));
log.info("PUT Request: " + tempScopeUri + " ... DONE");
// Scope should be there now
request = executor.execute(builder.buildGetRequest(tempScopeUri)
.withHeader("Accept", KRFormat.TURTLE));
request.assertStatus(200).assertContentContains(tempScopeUri);
log.info("Request: " + tempScopeUri + " ... DONE");
// TODO the U of CRUD
// Delete scope
executor.execute(builder.buildOtherRequest(new HttpDelete(builder.buildUrl(tempScopeUri))));
log.info("DELETE Request: " + tempScopeUri + " ... DONE");
// Scope should not be there
request = executor.execute(builder.buildGetRequest(tempScopeUri)
.withHeader("Accept", KRFormat.TURTLE));
request.assertStatus(404);
log.info("Request: " + tempScopeUri + " (should return 404) ... DONE");
}