MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
ContainerRequestUserRole creq =
new ContainerRequestUserRole("POST", new URI(REST_REPOSITORY_SERVICE_PATH
+ RestRepositoryService.Constants.OperationType.REMOVE_WORKSPACE + "/" + rName + "/" + wsName + "/false/"),
new URI(""), null, new InputHeadersMap(headers));
ByteArrayContainerResponseWriter responseWriter = new ByteArrayContainerResponseWriter();
ContainerResponse cres = new ContainerResponse(responseWriter);
handler.handleRequest(creq, cres);
assertEquals(409, cres.getStatus());
//remove with prepare close sessions
creq =
new ContainerRequestUserRole("POST", new URI(REST_REPOSITORY_SERVICE_PATH
+ RestRepositoryService.Constants.OperationType.REMOVE_WORKSPACE + "/" + rName + "/" + wsName + "/true/"),
new URI(""), null, new InputHeadersMap(headers));
responseWriter = new ByteArrayContainerResponseWriter();
cres = new ContainerResponse(responseWriter);
handler.handleRequest(creq, cres);