DASpecification { public static TArtifactType getArtifactTypeOfDA(TDeploymentArtifact deploymentArtifact) { QName DAArtifactTypeQName = deploymentArtifact.getArtifactType(); ArtifactTypeId artifactTypeId = new ArtifactTypeId(DAArtifactTypeQName); TArtifactType artifactType = RepositoryFactory.getRepository().getElement(artifactTypeId); return artifactType; }  static List<TNodeTemplate> getNodeTemplatesWithAbstractDAs(TTopologyTemplate topologyTemplate); static TArtifactType getArtifactTypeOfDA(TDeploymentArtifact deploymentArtifact); static List<TArtifactType> getArtifactTypeHierarchy(TArtifactType artifactType); static Map<TRelationshipTemplate, TNodeTemplate> getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode(TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate); static TNodeTemplate getNodesWithSuitableConcreteDAs(TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate); static TDeploymentArtifact getSuitableConcreteDA(TDeploymentArtifact abstractDeploymentArtifact, TNodeTemplate nodeTemplate);  }
@Test public void getArtifactTypeOfDA() throws Exception { setRevisionTo("af529e513388dc9358a8f700757d8dc59aba3a55"); ServiceTemplateId id = new ServiceTemplateId("http: TTopologyTemplate topologyTemplate = this.repository.getElement(id).getTopologyTemplate(); TNodeTemplate nodeTemplateWithAbstractDA = topologyTemplate.getNodeTemplate("shetland_pony"); TDeploymentArtifact deploymentArtifact = nodeTemplateWithAbstractDA.getDeploymentArtifacts().getDeploymentArtifact().get(0); QName artifactTypeQName = deploymentArtifact.getArtifactType(); ArtifactTypeId artifactTypeId = new ArtifactTypeId(artifactTypeQName); TArtifactType artifactType = this.repository.getElement(artifactTypeId); assertEquals(artifactType.getTargetNamespace(), DASpecification.getArtifactTypeOfDA(nodeTemplateWithAbstractDA.getDeploymentArtifacts().getDeploymentArtifact().get(0)).getTargetNamespace()); assertEquals(artifactType.getName(), DASpecification.getArtifactTypeOfDA(nodeTemplateWithAbstractDA.getDeploymentArtifacts().getDeploymentArtifact().get(0)).getName()); }