import javax.servlet.*;import javax.servlet.http.*;import java.io.BufferedReader;import java.io.IOException;import java.io.UnsupportedEncodingException;import java.security.Principal;import java.util.*;
public class DigestSignTest {
public static void main(String[] args){
HttpServletRequest request = new HttpServletRequest(){
public String getAuthType(){return null;}
public Cookie[] getCookies(){return new Cookie[0];}
public long getDateHeader(String s){return 0;}
public String getHeader(String s){
Map<String, String>v= new HashMap<String, String>();
v.put("Timestamp", "12345678912");
v.put("App-Key", "superMan");
v.put("App-Sign", "00d777ecfe05b9bd2a4d616f58b44556");return v.get(s);}
public Enumeration<String> getHeaders(String s){
Vector v= new Vector();
v.addElement("Timestamp");
v.addElement("App-Key");
v.addElement("App-Sign");
Enumeration e = v.elements();return e;}
public Enumeration<String> getHeaderNames(){
Vector v= new Vector();
v.addElement("Timestamp");
v.addElement("App-Key");
v.addElement("App-Sign");
Enumeration e = v.elements();return e;}
public int getIntHeader(String s){return 0;}
public String getMethod(){return null;}
public String getPathInfo(){return null;}
public String getPathTranslated(){return null;}
public String getContextPath(){return null;}
public String getQueryString(){return null;}
public String getRemoteUser(){return null;}
public boolean isUserInRole(String s){returnfalse;}
public Principal getUserPrincipal(){return null;}
public String getRequestedSessionId(){return null;}
public String getRequestURI(){return null;}
public StringBuffer getRequestURL(){return null;}
public String getServletPath(){return null;}
public HttpSession getSession(boolean b){return null;}
public HttpSession getSession(){return null;}
public String changeSessionId(){return null;}
public boolean isRequestedSessionIdValid(){returnfalse;}
public boolean isRequestedSessionIdFromCookie(){returnfalse;}
public boolean isRequestedSessionIdFromURL(){returnfalse;}
public boolean isRequestedSessionIdFromUrl(){returnfalse;}
public boolean authenticate(HttpServletResponse httpServletResponse) throws IOException, ServletException {returnfalse;}
public void login(String s, String s1) throws ServletException {}
public void logout() throws ServletException {}
public Collection<Part> getParts() throws IOException, ServletException {return null;}
public Part getPart(String s) throws IOException, ServletException {return null;}
public <T extends HttpUpgradeHandler> T upgrade(Class<T> aClass) throws IOException, ServletException {return null;}
public Object getAttribute(String s){return null;}
public Enumeration<String> getAttributeNames(){return null;}
public String getCharacterEncoding(){return null;}
public void setCharacterEncoding(String s) throws UnsupportedEncodingException {}
public int getContentLength(){return 0;}
public long getContentLengthLong(){return 0;}
public String getContentType(){return null;}
public ServletInputStream getInputStream() throws IOException {return null;}
public String getParameter(String s){return null;}
public Enumeration<String> getParameterNames(){return null;}
public String[] getParameterValues(String s){return new String[0];}
public Map<String, String[]> getParameterMap(){return null;}
public String getProtocol(){return null;}
public String getScheme(){return null;}
public String getServerName(){return null;}
public int getServerPort(){return 0;}
public BufferedReader getReader() throws IOException {return null;}
public String getRemoteAddr(){return null;}
public String getRemoteHost(){return null;}
public void setAttribute(String s, Object o){}
public void removeAttribute(String s){}
public Locale getLocale(){return null;}
public Enumeration<Locale> getLocales(){return null;}
public boolean isSecure(){returnfalse;}
public RequestDispatcher getRequestDispatcher(String s){return null;}
public String getRealPath(String s){return null;}
public int getRemotePort(){return 0;}
public String getLocalName(){return null;}
public String getLocalAddr(){return null;}
public int getLocalPort(){return 0;}
public ServletContext getServletContext(){return null;}
public AsyncContext startAsync() throws IllegalStateException {return null;}
public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException {return null;}
public boolean isAsyncStarted(){returnfalse;}
public boolean isAsyncSupported(){returnfalse;}
public AsyncContext getAsyncContext(){return null;}
public DispatcherType getDispatcherType(){return null;}};
Boolean bl = DigestSignUtils.isAuth(request);
System.out.println("bl:" + bl);}}