@Test
public void addStateArtifactToNodeTemplateThatAlreadyHasADeploymentArtifact() throws Exception {

    this.setRevisionTo("origin/plain");
    Path filePath = MavenTestingUtils.getProjectFilePath("src/test/resources/servicetemplates/plan.zip");
    this.assertNoContentPost("servicetemplates/http%253A%252F%252Fopentosca.org%252Fexamples%252Fservicetemplates/ServiceTemplateWithDeploymentArtifact_w1-wip1/"
            + "topologytemplate/nodetemplates/StatefulComponent_w1-wip1/state",
        filePath);
    TNodeTemplate nodeTemplate = getObjectFromGetRequest("servicetemplates/" +
            "http%253A%252F%252Fopentosca.org%252Fexamples%252Fservicetemplates/ServiceTemplateWithDeploymentArtifact_w1-wip1/" +
            "topologytemplate/nodetemplates/StatefulComponent_w1-wip1",
        TNodeTemplate.class
    );
    TDeploymentArtifacts deploymentArtifacts = nodeTemplate.getDeploymentArtifacts();
    assertNonNull(deploymentArtifacts);
    assertEquals(2, deploymentArtifacts.getDeploymentArtifact().size());
    assertNonNull(deploymentArtifacts.getDeploymentArtifact("test-artifact"));
    TDeploymentArtifact deploymentArtifact = deploymentArtifacts.getDeploymentArtifact("state");
    assertNonNull(deploymentArtifact);
    assertEquals(OpenToscaBaseTypes.stateArtifactType, deploymentArtifact.getArtifactType());
}