@Test
  public void testClassifyDependencies() {
    Set<Artifact> artifacts =
        ImmutableSet.of(
            newArtifact("com.test", "dependencyA", "1.0"),
            newArtifact("com.test", "dependencyB", "4.0-SNAPSHOT"),
            newArtifact("com.test", "projectA", "1.0"),
            newArtifact("com.test", "dependencyC", "1.0-SNAPSHOT"),
            newArtifact("com.test", "dependencyD", "4.0"),
            newArtifact("com.test", "projectB", "1.0-SNAPSHOT"),
            newArtifact("com.test", "projectC", "3.0"));

    Set<Artifact> projectArtifacts =
        ImmutableSet.of(
            newArtifact("com.test", "projectA", "1.0"),
            newArtifact("com.test", "projectB", "1.0-SNAPSHOT"),
            newArtifact("com.test", "projectC", "3.0"));

    Map<LayerType, List<Path>> classified =
        mavenProjectProperties.classifyDependencies(artifacts, projectArtifacts);

    assertThat(classified.get(LayerType.DEPENDENCIES))
        .containsExactly(
            newArtifact("com.test", "dependencyA", "1.0").getFile().toPath(),
            newArtifact("com.test", "dependencyD", "4.0").getFile().toPath());

    assertThat(classified.get(LayerType.SNAPSHOT_DEPENDENCIES))
        .containsExactly(
            newArtifact("com.test", "dependencyB", "4.0-SNAPSHOT").getFile().toPath(),
            newArtifact("com.test", "dependencyC", "1.0-SNAPSHOT").getFile().toPath());

    assertThat(classified.get(LayerType.PROJECT_DEPENDENCIES))
        .containsExactly(
            newArtifact("com.test", "projectA", "1.0").getFile().toPath(),
            newArtifact("com.test", "projectB", "1.0-SNAPSHOT").getFile().toPath(),
            newArtifact("com.test", "projectC", "3.0").getFile().toPath());
  }
Helper for reading back layers in a {@link BuildContext}.
jib-maven-plugin/src/test/java/com/google/cloud/tools/jib/maven/MavenProjectPropertiesTest.java