### Question:
IncomingRequestAddressStrategy implements IServerAddressStrategy { @Override public String determineServerBase(ServletContext theServletContext, HttpServletRequest theRequest) { if (theRequest == null) { return null; } String requestFullPath = StringUtils.defaultString(theRequest.getRequestURI()); String servletPath; if (myServletPath != null) { servletPath = myServletPath; } else { servletPath = StringUtils.defaultString(theRequest.getServletPath()); } StringBuffer requestUrl = theRequest.getRequestURL(); String servletContextPath = StringUtils.defaultString(theRequest.getContextPath()); String requestPath = requestFullPath.substring(servletContextPath.length() + servletPath.length()); if (requestPath.length() > 0 && requestPath.charAt(0) == '/') { requestPath = requestPath.substring(1); } int startOfPath = requestUrl.indexOf(" int requestUrlLength = requestUrl.length(); if (startOfPath != -1 && (startOfPath + 2) < requestUrlLength) { startOfPath = requestUrl.indexOf("/", startOfPath + 2); } if (startOfPath == -1) { startOfPath = 0; } int contextIndex; if (servletPath.length() == 0 || servletPath.equals("/")) { if (requestPath.length() == 0) { contextIndex = requestUrlLength; } else { contextIndex = requestUrl.indexOf(requestPath, startOfPath); } } else { contextIndex = requestUrl.indexOf(servletPath + "/", startOfPath); if (contextIndex == -1) { contextIndex = requestUrl.indexOf(servletPath, startOfPath); } } String fhirServerBase; int length = contextIndex + servletPath.length(); if (length > requestUrlLength) { length = requestUrlLength; } fhirServerBase = requestUrl.substring(0, length); return fhirServerBase; }  @Override String determineServerBase(ServletContext theServletContext, HttpServletRequest theRequest); void setServletPath(String theServletPath); static String determineServletContextPath(HttpServletRequest theRequest, RestfulServer server);  }### Answer:
@Test public void testRequestWithNull() { IncomingRequestAddressStrategy s = new IncomingRequestAddressStrategy(); String result = s.determineServerBase(null, null); assertNull(result); }