HttpServletRequestImpl implements HttpServletRequest { @Override public String getContentType() { return headers.getHeader(Headers.HEADER_CONTENT_TYPE); } private  HttpServletRequestImpl(); @Override String getRequestURI(); @Override StringBuilder getRequestURL(); @Override String getHeader(final String name); @Override int getIntHeader(final String name); @Override String getRemoteAddr(); @Override boolean isMultipart(); @Override Headers getHeaders(); @Override long getDateHeader(final String name); @Override Enumeration getHeaderNames(); @Override Cookie[] getCookies(); @Override String getQueryString(); @Override String getRequestedSessionId(); @Override Object getAttribute(final String name); @Override Enumeration getAttributeNames(); @Override String getCharacterEncoding(); @Override int getContentLength(); @Override String getContentType(); @Override InputStream getInputStream(); @Override String getLocalAddr(); @Override Locale getLocale(); @Override Enumeration getLocales(); @Override String getLocalName(); @Override int getLocalPort(); @Override Map getParameterMap(); @Override Enumeration getParameterNames(); @Override String[] getParameterValues(final String name); @Override String getProtocol(); @Override BufferedReader getReader(); @Override String getRemoteHost(); @Override int getRemotePort(); @Override String getScheme(); @Override String getServerName(); @Override int getServerPort(); @Override boolean isSecure(); @Override void removeAttribute(final String name); @Override void setAttribute(final String name, final Object o); @Override void setCharacterEncoding(final String characterEncoding); @Override String getMethod(); @Override Collection<UploadedFile> getUploadedFiles(); @Override Cookie getCookie(final String cookieName); @Override String getParameter(final String paramName); @Override String getPostParameter(final String paramName); @Override HttpSession getSession(final boolean create); @Override HttpSession getSession(); @Override String getAuthType(); @Override String getContextPath(); @Override ServletContext getServletContext(); @Override String getPathTranslated(); @Override String getPathInfo(); @Override String getRemoteUser(); @Override Principal getUserPrincipal(); @Override boolean isRequestedSessionIdFromCookie(); @Override boolean isRequestedSessionIdFromURL(); @Override boolean isRequestedSessionIdValid(); @Override boolean isUserInRole(final String role); void setServletContext(final ServletContextImpl servletContext); static Builder createNewBuilder();  }
@Test public void shouldReturnContentType() { Headers customHeaders = new Headers(); customHeaders.setHeader(Headers.HEADER_CONTENT_TYPE, "SOME_TYPE/TEXT"); httpServletRequestImpl = builder.withHeaders(customHeaders).build(); assertThat(httpServletRequestImpl.getContentType(), is("SOME_TYPE/TEXT")); }