public static Builder builder() {
    return new Builder();
  }
@Test
  public void testBuilder_digestWarning()
      throws CacheDirectoryCreationException, InvalidImageReferenceException {
    EventHandlers mockEventHandlers = Mockito.mock(EventHandlers.class);
    BuildContext.Builder builder = createBasicTestBuilder().setEventHandlers(mockEventHandlers);

    builder
        .setBaseImageConfiguration(
            ImageConfiguration.builder(
                    ImageReference.parse(
                        "image@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
                .build())
        .build();
    Mockito.verify(mockEventHandlers, Mockito.never()).dispatch(LogEvent.warn(Mockito.anyString()));

    builder
        .setBaseImageConfiguration(
            ImageConfiguration.builder(ImageReference.parse("image:tag")).build())
        .build();
    Mockito.verify(mockEventHandlers)
        .dispatch(
            LogEvent.warn(
                "Base image 'image:tag' does not use a specific image digest - build may not be reproducible"));
  }