// Path: simple-war/src/main/java/com/giffing/examples/wicket/spring/boot/simplewar/HomePage.java
// @WicketHomePage
// public class HomePage extends WebPage {
// 	
// 	Label currentTime;
// 	
// 	public HomePage() {
// 		currentTime = new Label( "currentTime", "no time" );
// 		currentTime.setOutputMarkupId( true );
// 		add(currentTime);
// 		
// 		Form form = new Form("form"){
// 			@Override
// 			protected void onSubmit() {
// 					setResponsePage(SecondPage.class);
// 			}
// 		};
// 		queue(form);
// 		
// 		
// 		add(new Link<Void>("mylink") {
// 					@Override
// 					public void onClick() {
// 						setResponsePage(SecondPage.class);
// 					}
// 		        });
// 	}	
// }
// 
// Path: simple-war/src/main/java/com/giffing/examples/wicket/spring/boot/simplewar/SecondPage.java
// public class SecondPage extends WebPage {
// 
// }
// 
// Path: simple-war/src/main/java/com/giffing/examples/wicket/spring/boot/simplewar/WicketApplication.java
// @SpringBootApplication
// public class WicketApplication extends SpringBootServletInitializer {
// 
// 	public static void main(String[] args) throws Exception {
// 		new SpringApplicationBuilder()
// 			.sources(WicketApplication.class)
// 			.run(args);
// 	}
// 
// }


import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.util.tester.FormTester;
import org.apache.wicket.util.tester.WicketTester;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.util.ReflectionTestUtils;
import com.giffing.examples.wicket.spring.boot.simplewar.HomePage;
import com.giffing.examples.wicket.spring.boot.simplewar.SecondPage;
import com.giffing.examples.wicket.spring.boot.simplewar.WicketApplication;

package com.giffing.examples.wicket.spring.boot.simple;



@RunWith(SpringRunner.class)
@SpringBootTest(classes = WicketApplication.class)
public class HomePageTest {

	private WicketTester tester;

	@Autowired
	private WebApplication wicketApplication;

	@Autowired
	private ApplicationContext applicationContextMock;

	@Before
	public void setUp() {
		ReflectionTestUtils.setField(wicketApplication, "applicationContext", applicationContextMock);
		tester = new WicketTester(wicketApplication);
	}
	
	
	@Test
	public void testest() {

// Path: simple-war/src/main/java/com/giffing/examples/wicket/spring/boot/simplewar/HomePage.java
// @WicketHomePage
// public class HomePage extends WebPage {
// 	
// 	Label currentTime;
// 	
// 	public HomePage() {
// 		currentTime = new Label( "currentTime", "no time" );
// 		currentTime.setOutputMarkupId( true );
// 		add(currentTime);
// 		
// 		Form form = new Form("form"){
// 			@Override
// 			protected void onSubmit() {
// 					setResponsePage(SecondPage.class);
// 			}
// 		};
// 		queue(form);
// 		
// 		
// 		add(new Link<Void>("mylink") {
// 					@Override
// 					public void onClick() {
// 						setResponsePage(SecondPage.class);
// 					}
// 		        });
// 	}	
// }
// 
// Path: simple-war/src/main/java/com/giffing/examples/wicket/spring/boot/simplewar/SecondPage.java
// public class SecondPage extends WebPage {
// 
// }
// 
// Path: simple-war/src/main/java/com/giffing/examples/wicket/spring/boot/simplewar/WicketApplication.java
// @SpringBootApplication
// public class WicketApplication extends SpringBootServletInitializer {
// 
// 	public static void main(String[] args) throws Exception {
// 		new SpringApplicationBuilder()
// 			.sources(WicketApplication.class)
// 			.run(args);
// 	}
// 
// }


// Path: simple-war/src/test/java/com/giffing/examples/wicket/spring/boot/simple/HomePageTest.java
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.util.tester.FormTester;
import org.apache.wicket.util.tester.WicketTester;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.util.ReflectionTestUtils;
import com.giffing.examples.wicket.spring.boot.simplewar.HomePage;
import com.giffing.examples.wicket.spring.boot.simplewar.SecondPage;
import com.giffing.examples.wicket.spring.boot.simplewar.WicketApplication;

package com.giffing.examples.wicket.spring.boot.simple;



@RunWith(SpringRunner.class)
@SpringBootTest(classes = WicketApplication.class)
public class HomePageTest {

	private WicketTester tester;

	@Autowired
	private WebApplication wicketApplication;

	@Autowired
	private ApplicationContext applicationContextMock;

	@Before
	public void setUp() {
		ReflectionTestUtils.setField(wicketApplication, "applicationContext", applicationContextMock);
		tester = new WicketTester(wicketApplication);
	}
	
	
	@Test
	public void testest() {

		tester.startPage(HomePage.class);
