### Question:
DockerBuildService implements BuildService { @Override public void build(ImageConfiguration imageConfig) throws JshiftServiceException { io.jshift.kit.build.service.docker.BuildService dockerBuildService = dockerServiceHub.getBuildService(); io.jshift.kit.build.service.docker.BuildService.BuildContext dockerBuildContext = config.getDockerBuildContext(); ImagePullManager imagePullManager = config.getImagePullManager(); try { dockerBuildService.buildImage(imageConfig, imagePullManager, dockerBuildContext); dockerBuildService.tagImage(imageConfig.getName(), imageConfig); } catch (Exception ex) { throw new JshiftServiceException("Error while trying to build the image", ex); } } DockerBuildService(ServiceHub dockerServiceHub, BuildServiceConfig config); @Override void build(ImageConfiguration imageConfig); @Override void postProcess(BuildServiceConfig config);  }### Answer:
@Test public void testSuccessfulBuild() throws Exception { final BuildService.BuildContext context = new BuildService.BuildContext.Builder() .build(); final io.jshift.kit.config.service.BuildService.BuildServiceConfig config = new io.jshift.kit.config.service.BuildService.BuildServiceConfig.Builder() .dockerBuildContext(context) .imagePullManager(new ImagePullManager(new TestCacheStore(), ImagePullPolicy.Always.name(), AutoPullMode.ALWAYS.name())) .build(); final String imageName = "image-name"; final ImageConfiguration image = new ImageConfiguration.Builder() .name(imageName) .buildConfig(new BuildConfiguration.Builder() .from("from") .build() ).build(); DockerBuildService service = new DockerBuildService(hub, config); service.build(image); new VerificationsInOrder() {{ buildService.buildImage(image, config.getImagePullManager(), context); buildService.tagImage(imageName, image); }}; }