MockHttpServletRequest request = new MockHttpServletRequest();
request.setRequestURI( "/feeds/unauthorized-repo" );
request.addHeader( "User-Agent", "Apache Archiva unit test" );
request.setMethod( "GET" );
Encoder encoder = new Base64();
String userPass = "unauthUser:unauthPass";
String encodedUserPass = new String( (byte[]) encoder.encode( userPass.getBytes() ) );
request.addHeader( "Authorization", "BASIC " + encodedUserPass );
MockHttpServletResponse mockHttpServletResponse = new MockHttpServletResponse();
rssFeedServlet.doGet( request, mockHttpServletResponse );