ContainerResponse containerResponse =
service(WebDAVMethods.PUT, getPathWS() + TestUtils.getFileName(), "", null, content.getBytes());
assertEquals(HTTPStatus.CREATED, containerResponse.getStatus());
MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
headers.add(ExtHttpHeaders.FILE_NODETYPE, "nt:folder");
containerResponse =
service(WebDAVMethods.PUT, getPathWS() + TestUtils.getFileName(), "", headers, content.getBytes());
assertEquals(HTTPStatus.BAD_REQUEST, containerResponse.getStatus());
String fileName = TestUtils.getFileName();
headers = new MultivaluedMapImpl();
headers.add(ExtHttpHeaders.FILE_NODETYPE, "nt:file");
containerResponse = service(WebDAVMethods.PUT, getPathWS() + fileName, "", headers, content.getBytes());
assertEquals(HTTPStatus.CREATED, containerResponse.getStatus());
assertEquals("nt:file", TestUtils.getFileNodeType(session, fileName));
}