@Before
  public void setUp() throws IOException, URISyntaxException {
    when(mockLog.isDebugEnabled()).thenReturn(true);
    when(mockLog.isWarnEnabled()).thenReturn(true);
    when(mockLog.isErrorEnabled()).thenReturn(true);

    when(mockMavenSession.getRequest()).thenReturn(mockMavenRequest);
    mavenProjectProperties =
        new MavenProjectProperties(
            mockJibPluginDescriptor,
            mockMavenProject,
            mockMavenSession,
            mockLog,
            mockTempDirectoryProvider,
            Collections.emptyList(),
            mockExtensionLoader);

    Path outputPath = getResource("maven/application/output");
    Path dependenciesPath = getResource("maven/application/dependencies");

    when(mockMavenProject.getBuild()).thenReturn(mockBuild);
    when(mockBuild.getOutputDirectory()).thenReturn(outputPath.toString());

    Set<Artifact> artifacts =
        ImmutableSet.of(
            newArtifact(dependenciesPath.resolve("library.jarC.jar")),
            newArtifact(dependenciesPath.resolve("libraryB.jar")),
            newArtifact(dependenciesPath.resolve("libraryA.jar")),
            newArtifact(dependenciesPath.resolve("more/dependency-1.0.0.jar")),
            newArtifact(dependenciesPath.resolve("another/one/dependency-1.0.0.jar")),
            // Maven reads and populates "Artifacts" with its own processing, so read some from a
            // repository
            testRepository.findArtifact("com.test", "dependency", "1.0.0"),
            testRepository.findArtifact("com.test", "dependencyX", "1.0.0-SNAPSHOT"));
    when(mockMavenProject.getArtifacts()).thenReturn(artifacts);

    Path emptyDirectory =
        getResource("maven/webapp").resolve("final-name/WEB-INF/classes/empty_dir");
    Files.createDirectories(emptyDirectory);

    when(mockMavenProject.getProperties()).thenReturn(mockMavenProperties);
  }
Helper for reading back layers in a {@link BuildContext}.
jib-maven-plugin/src/test/java/com/google/cloud/tools/jib/maven/MavenProjectPropertiesTest.java