### Question:
HttpServletRequestUtils { public static boolean isDefaultPort(String scheme, int port) { Preconditions.checkNotNull(scheme); return ((scheme.equals("http") && port == 80) || (scheme.equals("https") && port == 443)); } private  HttpServletRequestUtils(); static String extractClientIp(HttpServletRequest request); static String extractScheme(HttpServletRequest request); static String extractHost(HttpServletRequest request); static int extractServerPort(HttpServletRequest request); static String constructRequestBaseUrl(HttpServletRequest request); static String constructRequestUrl(HttpServletRequest request); static String constructRequestUrlWithParameters(HttpServletRequest request); static boolean isDefaultPort(String scheme, int port);  }### Answer:
@Test public void isDefaultPort() { assertTrue(HttpServletRequestUtils.isDefaultPort("https", 443)); assertTrue(HttpServletRequestUtils.isDefaultPort("http", 80)); assertFalse(HttpServletRequestUtils.isDefaultPort("https", 80)); assertFalse(HttpServletRequestUtils.isDefaultPort("http", 443)); assertFalse(HttpServletRequestUtils.isDefaultPort("http", 4443)); }
@Test(expected=NullPointerException.class) public void isDefaultPort_Scheme_NULL() { HttpServletRequestUtils.isDefaultPort(null, 443); }