@Override
  public DockerInfoDetails info() throws IOException, InterruptedException {
    // Runs 'docker info'.
    Process infoProcess = docker("info", "-f", "{{json .}}");
    InputStream inputStream = infoProcess.getInputStream();
    if (infoProcess.waitFor() != 0) {
      throw new IOException(
          "'docker info' command failed with error: " + getStderrOutput(infoProcess));
    }
    return JsonTemplateMapper.readJson(inputStream, DockerInfoDetails.class);
  }
@Test
  public void testInfo_returnsUnknownKeys() throws InterruptedException, IOException {
    String dockerInfoJson = "{ \"unknownOS\": \"windows\"," + "\"unknownArchitecture\": \"arm64\"}";
    DockerClient testDockerClient =
        new CliDockerClient(
            subcommand -> {
              assertThat(subcommand).containsExactly("info", "-f", "{{json .}}");
              return mockProcessBuilder;
            });
    Mockito.when(mockProcess.waitFor()).thenReturn(0);
    Mockito.when(mockProcess.getInputStream())
        .thenReturn(new ByteArrayInputStream(dockerInfoJson.getBytes()));

    DockerInfoDetails infoDetails = testDockerClient.info();
    assertThat(infoDetails.getArchitecture()).isEmpty();
    assertThat(infoDetails.getOsType()).isEmpty();
  }