// Path: src/main/java/com/github/ferstl/depgraph/graph/NodeRenderer.java
// public interface NodeRenderer<T> {
// 
//   String render(T node);
// }
// 
// Path: src/test/java/com/github/ferstl/depgraph/dependency/DependencyNodeUtil.java
// public static void addClassifiers(DependencyNode dependencyNode, String... classifiers) {
//   for (String classifier : classifiers) {
//     Artifact artifact = dependencyNode.getArtifact();
//     DependencyNode nodeWithClassifier = new DependencyNode(createArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getScope(), "jar", classifier, artifact.isOptional()));
//     dependencyNode.merge(nodeWithClassifier);
//   }
// }
// 
// Path: src/test/java/com/github/ferstl/depgraph/dependency/DependencyNodeUtil.java
// public static void addTypes(DependencyNode dependencyNode, String... types) {
//   for (String type : types) {
//     Artifact artifact = dependencyNode.getArtifact();
//     DependencyNode nodeWithClassifier = new DependencyNode(createArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getScope(), type, artifact.getClassifier(), artifact.isOptional()));
//     dependencyNode.merge(nodeWithClassifier);
//   }
// }
// 
// Path: src/test/java/com/github/ferstl/depgraph/dependency/DependencyNodeUtil.java
// public static DependencyNode createDependencyNode(String groupId, String artifactId, String version) {
//   return new DependencyNode(createArtifact(groupId, artifactId, version, false));
// }


import org.junit.jupiter.api.Test;
import com.github.ferstl.depgraph.graph.NodeRenderer;
import static com.github.ferstl.depgraph.dependency.DependencyNodeUtil.addClassifiers;
import static com.github.ferstl.depgraph.dependency.DependencyNodeUtil.addTypes;
import static com.github.ferstl.depgraph.dependency.DependencyNodeUtil.createDependencyNode;
import static org.junit.jupiter.api.Assertions.assertEquals;
    // assert
    assertEquals(renderGroupIdVersionOptionalResult(), result);
  }

  @Test
  final void renderArtifactIdVersion() {
    // arrange
    DependencyNode node = createDependencyNode("groupId", "artifactId", "version");
    NodeRenderer<DependencyNode> renderer = createNodeNameRenderer(false, true, false, false, true, false, true);

    // act
    String result = renderer.render(node);

    // assert
    assertEquals(renderArtifactIdVersionResult(), result);
  }

  @Test
  final void renderArtifactIdVersionOptional() {
    // arrange
    DependencyNode node = createDependencyNode("groupId", "artifactId", "version", true);
    NodeRenderer<DependencyNode> renderer = createNodeNameRenderer(false, true, false, false, true, true, true);

    // act
    String result = renderer.render(node);

    // assert
    assertEquals(renderArtifactIdVersionOptionalResult(), result);
  }

// Path: src/main/java/com/github/ferstl/depgraph/graph/NodeRenderer.java
// public interface NodeRenderer<T> {
// 
//   String render(T node);
// }
// 
// Path: src/test/java/com/github/ferstl/depgraph/dependency/DependencyNodeUtil.java
// public static void addClassifiers(DependencyNode dependencyNode, String... classifiers) {
//   for (String classifier : classifiers) {
//     Artifact artifact = dependencyNode.getArtifact();
//     DependencyNode nodeWithClassifier = new DependencyNode(createArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getScope(), "jar", classifier, artifact.isOptional()));
//     dependencyNode.merge(nodeWithClassifier);
//   }
// }
// 
// Path: src/test/java/com/github/ferstl/depgraph/dependency/DependencyNodeUtil.java
// public static void addTypes(DependencyNode dependencyNode, String... types) {
//   for (String type : types) {
//     Artifact artifact = dependencyNode.getArtifact();
//     DependencyNode nodeWithClassifier = new DependencyNode(createArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getScope(), type, artifact.getClassifier(), artifact.isOptional()));
//     dependencyNode.merge(nodeWithClassifier);
//   }
// }
// 
// Path: src/test/java/com/github/ferstl/depgraph/dependency/DependencyNodeUtil.java
// public static DependencyNode createDependencyNode(String groupId, String artifactId, String version) {
//   return new DependencyNode(createArtifact(groupId, artifactId, version, false));
// }


// Path: src/test/java/com/github/ferstl/depgraph/dependency/AbstractDependencyNodeNameRendererTest.java
import org.junit.jupiter.api.Test;
import com.github.ferstl.depgraph.graph.NodeRenderer;
import static com.github.ferstl.depgraph.dependency.DependencyNodeUtil.addClassifiers;
import static com.github.ferstl.depgraph.dependency.DependencyNodeUtil.addTypes;
import static com.github.ferstl.depgraph.dependency.DependencyNodeUtil.createDependencyNode;
import static org.junit.jupiter.api.Assertions.assertEquals;

    // assert
    assertEquals(renderGroupIdVersionOptionalResult(), result);
  }

  @Test
  final void renderArtifactIdVersion() {
    // arrange
    DependencyNode node = createDependencyNode("groupId", "artifactId", "version");
    NodeRenderer<DependencyNode> renderer = createNodeNameRenderer(false, true, false, false, true, false, true);

    // act
    String result = renderer.render(node);

    // assert
    assertEquals(renderArtifactIdVersionResult(), result);
  }

  @Test
  final void renderArtifactIdVersionOptional() {
    // arrange
    DependencyNode node = createDependencyNode("groupId", "artifactId", "version", true);
    NodeRenderer<DependencyNode> renderer = createNodeNameRenderer(false, true, false, false, true, true, true);

    // act
    String result = renderer.render(node);

    // assert
    assertEquals(renderArtifactIdVersionOptionalResult(), result);
  }

  @Test