@Test
public void testGetServerContextPathURI() {

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