@Test
public void testDoGet_requestForApplication() throws Exception {

	Manager manager = new Manager();
	manager.configurationMngr().setWorkingDirectory( this.folder.newFolder());
	TestManagerWrapper wrapper = new TestManagerWrapper( manager );
	TestApplication app = new TestApplication();
	app.setDirectory( this.folder.newFolder());
	wrapper.addManagedApplication( new ManagedApplication( app ));
	HttpServletRequest req = Mockito.mock( HttpServletRequest.class );
	HttpServletResponse resp = Mockito.mock( HttpServletResponse.class );
	Mockito.when( req.getRequestURI()).thenReturn( "/roboconf-web-extension/kibana/" + app.getName());
	Mockito.when( req.getServletPath()).thenReturn( "/roboconf-web-extension/kibana" );
	TestServletOutputStream wrappedOs = new TestServletOutputStream();
	Mockito.when( resp.getOutputStream()).thenReturn( wrappedOs );
	KibanaExtensionServlet servlet = new KibanaExtensionServlet( manager );
	servlet.agentDashBoardUrl = "my-dashboard";
	servlet.doGet( req, resp );
	Mockito.verify( resp ).getOutputStream();
	String s = wrappedOs.os.toString( "UTF-8" );
	validateHtml( s );
	Assert.assertTrue( s.contains( "\t<th>Instance Path</th>\n" ));
	Assert.assertTrue( s.contains( "\t<th>Associated Dashboard</th>\n" ));
	Assert.assertTrue( s.contains( "=\"my-dashboard" ));
	Assert.assertTrue( s.contains( "<td>/mysql-vm</td>" ));
	Assert.assertTrue( s.contains( "=\"#" + KibanaExtensionConstants.WEB_ADMIN_PATH ));
}