@Test public void testReplace() { final String orig = "To have or not to have"; final String replacement = "be"; assertEquals(StringUtils.replace(orig, "have", replacement), "To be or not to be"); }
return prompt.prompt(LocaleFactory.localizedString(StringUtils.replace("The certificate for this server has expired. You might be connecting to a server that " + "is pretending to be “%@” which could put your confidential information at risk. " + "Would you like to connect to the server anyway?", "%@", hostname), "Keychain")); return prompt.prompt(LocaleFactory.localizedString(StringUtils.replace("The certificate for this server is not yet valid. You might be connecting to a server that " + "is pretending to be “%@” which could put your confidential information at risk. Would you like to connect to the server anyway?", "%@", hostname), "Keychain")); return prompt.prompt(LocaleFactory.localizedString(StringUtils.replace("The certificate for this server is invalid. " + "You might be connecting to a server that is pretending to be “%@” which could put " + "your confidential information at risk. Would you like to connect to the server anyway?", "%@", hostname), "Keychain"));