@Test
public void testDoGet() throws Exception {

	// Prepare the servlet
	File configurationDirectory = this.folder.newFolder();
	this.manager = new Manager();
	this.manager.configurationMngr().setWorkingDirectory( configurationDirectory );
	File appDir = ConfigurationUtils.findApplicationDirectory( "app", configurationDirectory );
	File descDir = new File( appDir, Constants.PROJECT_DIR_DESC );
	Assert.assertTrue( descDir.mkdirs());
	IconServlet servlet = new IconServlet( this.manager );
	// Add a fake file
	File trickFile = new File( descDir, "directory.jpg" );
	Assert.assertTrue( trickFile.mkdirs());
	// Prepare our mocks
	HttpServletRequest req = Mockito.mock( HttpServletRequest.class );
	HttpServletResponse resp = Mockito.mock( HttpServletResponse.class );
	Mockito.when( req.getPathInfo()).thenReturn( "/app/whatever.jpg" );
	servlet.doGet( req, resp );
	Mockito.verify( resp ).setStatus( HttpServletResponse.SC_NOT_FOUND );
	// Now, add a real icon and make sure it is returned
	// (it is returned if a MIME type was set).
	File singleJpgFile = new File( descDir, "whatever.jpg" );
	Assert.assertTrue( singleJpgFile.createNewFile());
	ServletOutputStream out = Mockito.mock( ServletOutputStream.class );
	Mockito.when( resp.getOutputStream()).thenReturn( out );
	servlet.doGet( req, resp );
	Mockito.verify( resp ).setContentType( IconUtils.MIME_JPG );
}