private static FileEntriesLayer getLayerByName(BuildContext buildContext, String name) {
      List<FileEntriesLayer> layers = buildContext.getLayerConfigurations();
      return layers.stream().filter(layer -> layer.getName().equals(name)).findFirst().get();
    }
Helper for reading back layers in a {@link BuildContext}.
jib-gradle-plugin/src/test/java/com/google/cloud/tools/jib/gradle/GradleProjectPropertiesTest.java