Changes changes = allChanges.removeFirst(); assertThat(changes.getChangeRequests().get(0), is(instanceOf(CreateNodeRequest.class))); assertThat(changes.getChangeRequests().get(0).changedLocation().getPath(), is(path("/a"))); assertThat(changes.getChangeRequests().get(1), is(instanceOf(CreateNodeRequest.class))); assertThat(changes.getChangeRequests().get(1).changedLocation().getPath(), is(path("/a/b"))); assertThat(changes.getChangeRequests().get(2), is(instanceOf(CreateNodeRequest.class))); assertThat(changes.getChangeRequests().get(2).changedLocation().getPath(), is(path("/a/b/c"))); assertThat(changes.getChangeRequests().get(3), is(instanceOf(CreateNodeRequest.class))); assertThat(changes.getChangeRequests().get(3).changedLocation().getPath(), is(path("/a/b/d")));
Location location = change.changedLocation(); assert (location.getPath() != null);