// @extract-start XLinkUtilsTestGenerateValidXLinkUrl
@Test
public void testGenerateValidXLinkUrl() throws ClassNotFoundException,
IOException, NoSuchFieldException, IllegalArgumentException,
IllegalAccessException {
XLinkUrlBlueprint xLinkTemplate =
XLinkUtils.prepareXLinkTemplate(servletUrl,
connectorId, modelsToViews, expiresInDays, registeredTools);
List<Object> values = new ArrayList<Object>(Arrays.asList("testMethod", "testClass", "testPackage"));
ModelDescription modelInformation = xLinkTemplate.getViewToModels().get(viewId1);
String modelAsJsonString = XLinkDemonstrationUtils
.serializeModelObjectToJSON(values, modelInformation, serviceFinder);
String xLinkUrl = XLinkDemonstrationUtils
.generateValidXLinkUrl(xLinkTemplate, modelInformation, contextId, modelAsJsonString);