@Test
  public void testGetJarArtifact_classifier() throws IOException {
    when(mockBuild.getDirectory()).thenReturn(Paths.get("/foo/bar").toString());
    when(mockBuild.getFinalName()).thenReturn("helloworld-1");

    when(mockMavenProject.getPlugin("org.apache.maven.plugins:maven-jar-plugin"))
        .thenReturn(mockPlugin);
    when(mockPlugin.getExecutions()).thenReturn(Arrays.asList(mockPluginExecution));
    when(mockPluginExecution.getId()).thenReturn("default-jar");
    when(mockPluginExecution.getConfiguration()).thenReturn(pluginConfiguration);
    addXpp3DomChild(pluginConfiguration, "classifier", "a-class");

    assertThat(mavenProjectProperties.getJarArtifact())
        .isEqualTo(Paths.get("/foo/bar/helloworld-1-a-class.jar"));
  }
Helper for reading back layers in a {@link BuildContext}.
jib-maven-plugin/src/test/java/com/google/cloud/tools/jib/maven/MavenProjectPropertiesTest.java