### Question:
AbstractJenkinsCLICommand implements JenkinsCLICommand<T, P> { protected String[] createCommands(JenkinsCLIConfiguration configuration, P parameter, boolean hidePasswords) { return createExecutionStrings(configuration, hidePasswords); }  final T execute(JenkinsCLIConfiguration configuration, P parameter);  }### Answer:
@Test public void commands_hidden_expected_output_done() { String expected = "[java, -Dhttp.proxyPassword=******, -Dhttps.proxyPassword=******, -jar, thePath, -s, http: String[] commands = commandToTest.createCommands(configuration, parameter, true); List<String> list = Arrays.asList(commands); assertEquals(expected, list.toString()); }
@Test public void commands_hidden_contains_no_http_proxy_passwords() throws Exception { String[] commands = commandToTest.createCommands(configuration, parameter, true); List<String> list = Arrays.asList(commands); assertFalse(list.contains(DHTTP_PROXY_PASSWORD_MYSECRET1)); assertFalse(list.contains(DHTTPS_PROXY_PASSWORD_MYSECRET2)); }
@Test public void commands_NOT_hidden_contains_http_proxy_passwords() throws Exception { String[] commands = commandToTest.createCommands(configuration, parameter, false); List<String> list = Arrays.asList(commands); assertTrue(list.contains(DHTTP_PROXY_PASSWORD_MYSECRET1)); assertTrue(list.contains(DHTTPS_PROXY_PASSWORD_MYSECRET2)); }
@Test public void command_auth_no_proxy_set() throws Exception { String[] commands = commandToTest.createCommands(configuration, parameter, true); List<String> list = Arrays.asList(commands); System.out.println(list); }
@Test public void commands_NOT_hidden_expected_output_done() { String expected = "[java, -Dhttp.proxyPassword=mysecret1, -Dhttps.proxyPassword=mysecret2, -jar, thePath, -s, http: String[] commands = commandToTest.createCommands(configuration, parameter, false); List<String> list = Arrays.asList(commands); assertEquals(expected, list.toString()); }