@Test
public void testCreateServerURI() {

    Settings settings = createHttpDefaultPortSettings();
    String serverUri = Settings.createServerURI();
    String expectedValue = "http://" + serverFqnd;
    assertEquals("no :port appended if default http port 80 is used.", expectedValue, serverUri);
    settings = createHttpOtherPortSettings();
    serverUri = Settings.createServerURI();
    expectedValue = "http://" + serverFqnd + ":" + httpOtherPort;
    assertEquals("other :port appended.", expectedValue, serverUri);
    settings = createHttpsDefaultPortSettings();
    serverUri = Settings.createServerURI();
    expectedValue = "https://" + serverFqnd;
    assertEquals("no :port appended if default https port 443 is used.", expectedValue, serverUri);
    settings = createHttpsOtherPortSettings();
    serverUri = Settings.createServerURI();
    expectedValue = "https://" + serverFqnd + ":" + httpsOtherPort;
    assertEquals("other :port appended.", expectedValue, serverUri);
}