  @Test
  public void testRetrieve_cmdSuffixAlreadyGivenOnWindows()
      throws CredentialHelperUnhandledServerUrlException, CredentialHelperNotFoundException,
          IOException {

    systemProperties.setProperty("os.name", "WINdows");
    List<String> command = Arrays.asList(Paths.get("/foo/bar.CmD").toString(), "get");
    Mockito.when(processBuilderFactory.apply(command)).thenReturn(processBuilder);

    DockerCredentialHelper credentialHelper =
        new DockerCredentialHelper(
            "serverUrl", Paths.get("/foo/bar.CmD"), systemProperties, processBuilderFactory);
    Credential credential = credentialHelper.retrieve();
    Assert.assertEquals("myusername", credential.getUsername());
    Assert.assertEquals("mysecret", credential.getPassword());

    Mockito.verify(processBuilderFactory).apply(command);
  }