public void testResolveArtifacts() throws Exception {
    String[] artifactsCoords = {
      "org.springframework.boot:spring-boot:jar:0.5.0.BUILD-SNAPSHOT", // spring snapshot artifact
      "org.springframework:spring-jdbc:jar:4.0.0.RELEASE", // spring release artifact
      "commons-logging:commons-logging:jar:1.1.3" // general purpose (from maven central)
    };
    List<Artifact> artifacts = new ArrayList<Artifact>();
    for (String c : artifactsCoords) {
      artifacts.add(new DefaultArtifact(c));
    }
    for (Artifact artifact : artifacts) {
      assertNull(artifact.getFile());
    }

    boolean ignoreUnresolved = false;
    artifacts = helper.resolve(artifacts, ignoreUnresolved);

    assertEquals(artifactsCoords.length, artifacts.size());

    for (Artifact artifact : artifacts) {
      assertNotNull("Artifact not resolved: '" + artifact + "'", artifact.getFile());
      assertTrue("Artifact not a file: '" + artifact + "'", artifact.getFile().isFile());
      assertTrue(
          "Artifact not a jar file: '" + artifact + "'",
          artifact.getFile().toString().endsWith(".jar"));
    }
  }
  public void testGetManagedDependencies() throws Exception {
    // Test that at least some expeced artifact ids are found.
    String[] expectedAIDs = {
      "spring-boot-starter-web", "spring-boot-starter", "spring-starter-logging"
    };

    assertExpectedArtifacts(expectedAIDs, helper.getManagedDependencies(Defaults.defaultParentPom));
  }