assertThat(nextCommand, is(instanceOf(CreateNodeRequest.class)));
CreateNodeRequest createNode = (CreateNodeRequest)nextCommand;
Path expectedPath = context.getValueFactories().getPathFactory().create(path);
Path parentPath = createNode.under().getPath();
assertThat(parentPath, is(expectedPath.getParent()));
assertThat(createNode.named(), is(expectedPath.getLastSegment().getName()));
if (properties.length > 0) {
Map<Name, Property> propertiesByName = new HashMap<Name, Property>();
for (Property prop : createNode.properties()) {
propertiesByName.put(prop.getName(), prop);