WineryRepositoryClient implements IWineryRepositoryClient { @Override public TTopologyTemplate getTopologyTemplate(QName serviceTemplate) { return this.getTopologyTemplate(serviceTemplate, "servicetemplates", "topologytemplate"); } WineryRepositoryClient();  WineryRepositoryClient(boolean useProxy); @Override void addRepository(String uri); @Override String getPrimaryRepository(); @Override void setPrimaryRepository(String uri); @Override SortedSet<String> getNamespaces(); @Override String getName(GenericId id); @Override List<QName> getQNameListOfAllTypes(Class<T> className); @Override Collection<QNameWithName> getListOfAllInstances(Class<? extends DefinitionsChildId> clazz); @Override Collection<T> getAllTypes(Class<T> c); @Override @SuppressWarnings("unchecked") T getType(QName qname, Class<T> type); @Override Definitions getDefinitions(DefinitionsChildId id); @Override Collection<TDefinitions> getAllTypesWithAssociatedElements(Class<T> c); @Override TTopologyTemplate getTopologyTemplate(QName serviceTemplate); @Override TTopologyTemplate getTopologyTemplate(QName serviceTemplate, String parentPath, String elementPath); @Override void setTopologyTemplate(QName serviceTemplate, TTopologyTemplate topologyTemplate); @Override QName getArtifactTypeQNameForExtension(String extension); @Override void createArtifactTemplate(QName qname, QName artifactType); @Override void createComponent(QName qname, Class<? extends DefinitionsChildId> idClass); @Override void forceDelete(GenericId id); @Override void rename(DefinitionsChildId oldId, DefinitionsChildId newId); @Override void duplicate(DefinitionsChildId from, DefinitionsChildId newId); @Override void forceDelete(Class<? extends DefinitionsChildId> definitionsChildIdClazz, Namespace namespace); @Override boolean primaryRepositoryAvailable(); static final JAXBContext context; }
@Test public void topologyTemplateOfServiceTemplateWithFourPoliciesIsNotNull() throws Exception { this.setRevisionTo("origin/plain"); QName serviceTemplate = new QName("http: TTopologyTemplate topologyTemplate = TestWineryRepositoryClient.client.getTopologyTemplate(serviceTemplate); assertNotNull(topologyTemplate); }
@Test public void getPropertiesOfTestTopologyTemplate() throws Exception { this.setRevisionTo("origin/plain"); QName serviceTemplate = new QName("http: TTopologyTemplate topologyTemplate = TestWineryRepositoryClient.client.getTopologyTemplate(serviceTemplate); assertNotNull(topologyTemplate); final TNodeTemplate nodeTemplateWithTwoKVProperties = topologyTemplate.getNodeTemplate("NodeTypeWithTwoKVProperties"); assertNotNull(nodeTemplateWithTwoKVProperties); TEntityTemplate.Properties properties = nodeTemplateWithTwoKVProperties.getProperties(); assertNotNull(properties); final LinkedHashMap<String, String> kvProperties = properties.getKVProperties(); assertNotNull(kvProperties); final String value = kvProperties.get("key1"); assertEquals("value", value); }