@Test
public void importFromRepositoryWithNtUnstructuredNodeWithNoPropertiesCausesSpuriousLocalDeletion()
throws Exception {
RepositoryAccessor repo = new RepositoryAccessor(config);
repo.createNode("/content/test-root/en", "nt:folder");
// create faceted project
IProject contentProject = projectRule.getProject();
ProjectAdapter project = new ProjectAdapter(contentProject);
project.addNatures(JavaCore.NATURE_ID, "org.eclipse.wst.common.project.facet.core.nature");
// install bundle facet
project.installFacet("sling.content", "1.0");
wstServer.waitForServerToStart();
project.createVltFilterWithRoots("/content/test-root");
project.createOrUpdateFile(Path.fromPortableString("jcr_root/content/test-root/en/hello.txt"),
new ByteArrayInputStream("hello, world".getBytes()));
ServerAdapter server = new ServerAdapter(wstServer.getServer());
server.installModule(contentProject);
deh.clearUnexpectedEventsAfterSettling();
repo.createNode("/content/test-root/folder", "sling:Folder");
repo.createNode("/content/test-root/folder/jcr:content", "nt:unstructured");
repo.createFile("/content/test-root/folder/jcr:content/some_file.txt", "dummy contents".getBytes());
repo.doWithSession(new SessionRunnable<Void>() {
@Override
public Void doWithSession(Session session) throws RepositoryException {
session.getRootNode().getNode("content/test-root/folder/jcr:content/some_file.txt/jcr:content")
.setProperty("jcr:mimeType", "x-vendor-reserved");