@Override
  public List<FileEntriesLayer> createLayers() throws IOException {
    // Add dependencies layers.
    List<FileEntriesLayer> layers =
        JarLayers.getDependenciesLayers(jarPath, ProcessingMode.packaged);

    // Add layer for jar.
    FileEntriesLayer jarLayer =
        FileEntriesLayer.builder()
            .setName(JarLayers.JAR)
            .addEntry(jarPath, JarLayers.APP_ROOT.resolve(jarPath.getFileName()))
            .build();
    layers.add(jarLayer);

    return layers;
  }
@Test
  public void testCreateLayers_dependencyDoesNotExist() throws URISyntaxException {
    Path standardJar = Paths.get(Resources.getResource(STANDARD_SINGLE_DEPENDENCY_JAR).toURI());
    StandardPackagedProcessor standardPackagedModeProcessor =
        new StandardPackagedProcessor(standardJar, JAR_JAVA_VERSION);

    IllegalArgumentException exception =
        assertThrows(
            IllegalArgumentException.class, () -> standardPackagedModeProcessor.createLayers());

    assertThat(exception)
        .hasMessageThat()
        .isEqualTo(
            "Dependency required by the JAR (as specified in `Class-Path` in the JAR manifest) doesn't exist: "
                + standardJar.getParent().resolve("dependency.jar"));
  }