public static ResourceId concat(ResourceId prefix, ResourceId path) {
        checkArgument(!path.nodeKeys().contains(DeviceResourceIds.ROOT_NODE),
                      "%s was already absolute path", path);
        try {
            return prefix.copyBuilder().append(path).build();
        } catch (CloneNotSupportedException e) {
            log.error("Could not copy {}", path, e);
            throw new IllegalArgumentException("Could not copy " + path, e);
        }
    }
@Test
    public void testConcat() {
        ResourceId devices = ResourceId.builder()
            .addBranchPointSchema(DeviceResourceIds.DEVICES_NAME,
                                  DCS_NAMESPACE)
            .build();

        assertEquals(DEVICES, ResourceIds.concat(ResourceIds.ROOT_ID, devices));
    }