### Question:
ContainerBuildPlan { public static Builder builder() { return new Builder(); } private  ContainerBuildPlan(
      String baseImage,
      Set<Platform> platforms,
      Instant creationTime,
      ImageFormat format,
      Map<String, String> environment,
      Map<String, String> labels,
      Set<AbsoluteUnixPath> volumes,
      Set<Port> exposedPorts,
      @Nullable String user,
      @Nullable AbsoluteUnixPath workingDirectory,
      @Nullable List<String> entrypoint,
      @Nullable List<String> cmd,
      List<LayerObject> layers); static Builder builder(); String getBaseImage(); Set<Platform> getPlatforms(); ImageFormat getFormat(); Instant getCreationTime(); Map<String, String> getEnvironment(); Set<AbsoluteUnixPath> getVolumes(); Map<String, String> getLabels(); Set<Port> getExposedPorts(); @Nullable String getUser(); @Nullable AbsoluteUnixPath getWorkingDirectory(); @Nullable List<String> getEntrypoint(); @Nullable List<String> getCmd(); List<? extends LayerObject> getLayers(); Builder toBuilder();  }### Answer:
@Test public void testBuilder() { ContainerBuildPlan plan = createSamplePlan(); Assert.assertEquals("base/image", plan.getBaseImage()); Assert.assertEquals( ImmutableSet.of(new Platform("testOs", "testArchitecture")), plan.getPlatforms()); Assert.assertEquals(ImageFormat.OCI, plan.getFormat()); Assert.assertEquals(Instant.ofEpochMilli(30), plan.getCreationTime()); Assert.assertEquals(ImmutableMap.of("env", "var"), plan.getEnvironment()); Assert.assertEquals( ImmutableSet.of(AbsoluteUnixPath.get("/mnt/foo"), AbsoluteUnixPath.get("/bar")), plan.getVolumes()); Assert.assertEquals(ImmutableMap.of("com.example.label", "cool"), plan.getLabels()); Assert.assertEquals(ImmutableSet.of(Port.tcp(443)), plan.getExposedPorts()); Assert.assertEquals(":", plan.getUser()); Assert.assertEquals(AbsoluteUnixPath.get("/workspace"), plan.getWorkingDirectory()); Assert.assertEquals(Arrays.asList("foo", "entrypoint"), plan.getEntrypoint()); Assert.assertEquals(Arrays.asList("bar", "cmd"), plan.getCmd()); Assert.assertEquals(1, plan.getLayers().size()); MatcherAssert.assertThat( plan.getLayers().get(0), CoreMatchers.instanceOf(FileEntriesLayer.class)); Assert.assertEquals( Arrays.asList( new FileEntry( Paths.get("/src/file/foo"), AbsoluteUnixPath.get("/path/in/container"), FilePermissions.fromOctalString("644"), Instant.ofEpochSecond(1))), ((FileEntriesLayer) plan.getLayers().get(0)).getEntries()); }
@Test public void testSetPlatforms_emptyPlatformsSet() { try { ContainerBuildPlan.builder().setPlatforms(Collections.emptySet()); Assert.fail(); } catch (IllegalArgumentException ex) { Assert.assertEquals("platforms set cannot be empty", ex.getMessage()); } }