Index: web/modeshape-web-jcr-rest-client/src/test/java/org/modeshape/web/jcr/rest/client/json/JsonRestClientTest.java
===================================================================
--- web/modeshape-web-jcr-rest-client/src/test/java/org/modeshape/web/jcr/rest/client/json/JsonRestClientTest.java	(revision 2381)
+++ web/modeshape-web-jcr-rest-client/src/test/java/org/modeshape/web/jcr/rest/client/json/JsonRestClientTest.java	(working copy)
@@ -27,7 +27,6 @@ import static org.hamcrest.core.Is.is;
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.hamcrest.core.IsNull.notNullValue;
 import static org.junit.Assert.assertThat;
-import java.io.File;
 import java.net.URL;
 import java.util.Collection;
 import java.util.Iterator;
@@ -36,13 +35,25 @@ import java.util.Map;
 import javax.jcr.nodetype.NodeType;
 import org.junit.Before;
 import org.junit.Ignore;
-import org.junit.Test;
 import org.modeshape.common.FixFor;
 import org.modeshape.web.jcr.rest.client.IJcrConstants;
-import org.modeshape.web.jcr.rest.client.IRestClient;
 import org.modeshape.web.jcr.rest.client.Status;
 import org.modeshape.web.jcr.rest.client.domain.QueryRow;
+import java.io.File;
 import org.modeshape.web.jcr.rest.client.domain.Repository;
+import org.apache.commons.httpclient.Credentials;
+import org.apache.commons.httpclient.HostConfiguration;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpConnectionManager;
+import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.auth.AuthScope;
+import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientRequestFactory;
+import org.jboss.resteasy.client.ClientResponse;
+import org.junit.Test;
+import org.modeshape.web.jcr.rest.client.IRestClient;
 import org.modeshape.web.jcr.rest.client.domain.Server;
 import org.modeshape.web.jcr.rest.client.domain.Workspace;
 
@@ -283,4 +294,63 @@ public final class JsonRestClientTest {
         assertThat((String)row.getValue("jcr:path"), is("/myproject/myfolder/document.txt"));
         assertThat((String)row.getValue("jcr:primaryType"), is("nt:file"));
     }
+
+    @Test
+    @Ignore
+    @FixFor("MODE-927")
+    /**
+     * This test doesn't do any actual checks and is ignored for now
+     * but it is designed to verify create/delete of REST resource.
+     */
+    public void testDelete() throws Exception {
+        String repositoryName = "mode:repository";
+        String workspaceName = "default";
+        Server server = new Server("http://127.0.0.1:8090/modeshape-rest", "dnauser", "password");
+        Repository r = new Repository(repositoryName, server);
+        Workspace workspace = new Workspace(workspaceName, r);
+        IRestClient client = new JsonRestClient();
+
+        String root = "http://127.0.0.1:8090/resources/mode:repository/default/items/";
+        String json = "{\"properties\":{\"jcr:primaryType\":\"nt:file\"},\"children\":{\"jcr:content\":{\"properties\":{\"jcr:primaryType\":\"nt:resource\",\"jcr:data\":\"VGhpcyBpcyB0ZXN0MkZpbGUgY29udGVudA==\"}}}}";
+
+
+        System.out.println("post path=" + root + "test2file");
+        System.out.println("post body=" + json);
+        ClientRequestFactory crf = new ClientRequestFactory(initClient());
+        ClientRequest request = crf.createRequest(root + "test2file");
+
+        request.body("application/json", json);
+
+        ClientResponse<String> response = request.post(String.class);
+        System.out.println("status=" + response.getStatus());
+        System.out.println("message=" + response.getEntity());
+
+
+        System.out.println("Deleting content..	");
+        ClientRequestFactory crf2 = new ClientRequestFactory(initClient());
+        ClientRequest request2 = crf2.createRequest(root + "test2file");
+
+        request.body("application/json", json);
+
+        ClientResponse<String> response2 = request2.delete(String.class);
+        System.out.println("status=" + response2.getStatus());
+        System.out.println("message=" + response2.getEntity());
+    }
+
+    private HttpClient initClient() throws Exception {
+        //Thread.sleep(600000);
+        HostConfiguration hostConfig = new HostConfiguration();
+        hostConfig.setHost("http://127.0.0.1:8090/resources/");
+        HttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
+        HttpConnectionManagerParams params = new HttpConnectionManagerParams();
+        int maxConnections = 20;
+        params.setMaxConnectionsPerHost(hostConfig, maxConnections);
+        connectionManager.setParams(params);
+        HttpClient httpClient = new HttpClient(connectionManager);
+        Credentials c = new UsernamePasswordCredentials("dnauser", "password");
+        httpClient.getState().setCredentials(AuthScope.ANY, c);
+        httpClient.setHostConfiguration(hostConfig);
+
+        return httpClient;
+    }
 }
