You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by da...@apache.org on 2015/10/25 10:47:55 UTC

wicket git commit: Zero warnings and reformatted wicket-arquillian

Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x 741a21965 -> d11c4afa8


Zero warnings and reformatted wicket-arquillian


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d11c4afa
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d11c4afa
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d11c4afa

Branch: refs/heads/wicket-7.x
Commit: d11c4afa8b330aaad751fefe1860cac425cba514
Parents: 741a219
Author: Martijn Dashorst <da...@apache.org>
Authored: Sun Oct 25 09:44:36 2015 +0100
Committer: Martijn Dashorst <da...@apache.org>
Committed: Sun Oct 25 09:44:36 2015 +0100

----------------------------------------------------------------------
 .../arquillian/testing/model/Contact.java       | 165 ++++++++++---------
 .../arquillian/testing/pages/InsertContact.java |  84 +++++-----
 .../arquillian/testing/pages/ListContacts.java  |   2 +-
 .../util/ResourceWebApplicationPath.java        |  10 +-
 .../testing/ApacheLicenceHeaderTest.java        |   2 -
 .../testing/TestWicketJavaEEApplication.java    |  16 +-
 .../deployment/AbstractDeploymentTest.java      | 146 +++++++++-------
 .../testing/pages/InsertContactTest.java        |  55 ++++---
 .../ArquillianContainerProvidedTest.java        |  86 ++++++----
 9 files changed, 321 insertions(+), 245 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/d11c4afa/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java
index e5a2bcc..d6c100f 100644
--- a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/model/Contact.java
@@ -41,85 +41,96 @@ import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.Id;
 
-
 /**
- *
  * @author Filippo Diotalevi
  */
-@SuppressWarnings("serial")
+@SuppressWarnings({ "serial", "javadoc" })
 @Entity
-public class Contact implements Serializable {
-
-    @Id
-    @GeneratedValue(strategy = IDENTITY)
-    private Long id;
-    private String name;
-    
-    @Column(unique=true)
-    private String email;
-
-    public Contact() {
-    }
-
-    public Contact(Long id, String name, String email) {
-        this.id = id;
-        this.name = name;
-        this.email = email;
-    }
-
-    public String getEmail() {
-        return email;
-    }
-
-    public void setEmail(String email) {
-        this.email = email;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((email == null) ? 0 : email.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        Contact other = (Contact) obj;
-        if (email == null) {
-            if (other.email != null)
-                return false;
-        } else if (!email.equals(other.email))
-            return false;
-        return true;
-    }
-    
-    @Override
-    public String toString() {
-    	return "Name: " + name + " / E-mail: " + email;
-    }
-    
+public class Contact implements Serializable
+{
+
+	@Id
+	@GeneratedValue(strategy = IDENTITY)
+	private Long id;
+	private String name;
+
+	@Column(unique = true)
+	private String email;
+
+	public Contact()
+	{
+	}
+
+	public Contact(Long id, String name, String email)
+	{
+		this.id = id;
+		this.name = name;
+		this.email = email;
+	}
+
+	public String getEmail()
+	{
+		return email;
+	}
+
+	public void setEmail(String email)
+	{
+		this.email = email;
+	}
+
+	public String getName()
+	{
+		return name;
+	}
+
+	public void setName(String name)
+	{
+		this.name = name;
+	}
+
+
+	public Long getId()
+	{
+		return id;
+	}
+
+	public void setId(Long id)
+	{
+		this.id = id;
+	}
+
+	@Override
+	public int hashCode()
+	{
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((email == null) ? 0 : email.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj)
+	{
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		Contact other = (Contact)obj;
+		if (email == null)
+		{
+			if (other.email != null)
+				return false;
+		}
+		else if (!email.equals(other.email))
+			return false;
+		return true;
+	}
+
+	@Override
+	public String toString()
+	{
+		return "Name: " + name + " / E-mail: " + email;
+	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/d11c4afa/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java
index e78831a..b8e2c76 100644
--- a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/InsertContact.java
@@ -43,59 +43,57 @@ import org.apache.wicket.markup.html.panel.FeedbackPanel;
 import org.apache.wicket.model.PropertyModel;
 
 /**
- *
  * @author Filippo Diotalevi
  */
-@SuppressWarnings("serial")
+@SuppressWarnings({ "serial", "javadoc" })
 public class InsertContact extends WebPage
 {
-    private Form<Contact> insertForm;
-    
-    private String name;
-    
-    private String email;
-    
-    @Inject
-    private ContactDao contactDao;
+	private Form<Contact> insertForm;
+
+	private String name;
+
+	private String email;
+
+	@Inject
+	private ContactDao contactDao;
 
-    public InsertContact()
-    {
-        add(new FeedbackPanel("feedback"));
+	public InsertContact()
+	{
+		add(new FeedbackPanel("feedback"));
 
-        insertForm = new Form<Contact>("insertForm") {
+		insertForm = new Form<Contact>("insertForm")
+		{
+			@Override
+			protected void onSubmit()
+			{
+				contactDao.addContact(name, email);
+				setResponsePage(ListContacts.class);
+			}
+		};
 
-            @Override
-            protected void onSubmit() {
-                contactDao.addContact(name, email);
-                setResponsePage(ListContacts.class);
-            }
-        };
+		insertForm.add(new RequiredTextField<>("name", new PropertyModel<String>(this, "name")));
+		insertForm.add(new RequiredTextField<>("email", new PropertyModel<String>(this, "email")));
+		add(insertForm);
+	}
 
-        insertForm.add(new RequiredTextField<>("name",
-                new PropertyModel<String>(this, "name")));
-        insertForm.add(new RequiredTextField<>("email", new PropertyModel<String>(this,
-                "email")));
-        add(insertForm);
-    }
 
-    
-    public String getEmail()
-    {
-        return email;
-    }
+	public String getEmail()
+	{
+		return email;
+	}
 
-    public void setEmail(String email)
-    {
-        this.email = email;
-    }
+	public void setEmail(String email)
+	{
+		this.email = email;
+	}
 
-    public String getName()
-    {
-        return name;
-    }
+	public String getName()
+	{
+		return name;
+	}
 
-    public void setName(String name)
-    {
-        this.name = name;
-    }
+	public void setName(String name)
+	{
+		this.name = name;
+	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/d11c4afa/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java
index f08ff55..7f922c2 100644
--- a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/pages/ListContacts.java
@@ -48,7 +48,7 @@ import org.apache.wicket.markup.html.list.ListView;
  * 
  * @author Filippo Diotalevi
  */
-@SuppressWarnings("serial")
+@SuppressWarnings({ "serial", "javadoc" })
 public class ListContacts extends WebPage
 {
     // Inject the ContactDao using @Inject

http://git-wip-us.apache.org/repos/asf/wicket/blob/d11c4afa/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
index d647626..d1a10ab 100644
--- a/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
+++ b/testing/wicket-arquillian/src/main/java/org/apache/wicket/arquillian/testing/util/ResourceWebApplicationPath.java
@@ -29,8 +29,7 @@ import org.apache.wicket.util.resource.IResourceStream;
  * Maintain a list of paths which might either be ordinary folders of the filesystem or relative
  * paths to the web application's servlet context.
  * 
- * @author felipecalmeida
- * 		Modified to look inside servletContext and same package as Application.
+ * @author felipecalmeida Modified to look inside servletContext and same package as Application.
  */
 public final class ResourceWebApplicationPath implements IResourceFinder
 {
@@ -38,17 +37,20 @@ public final class ResourceWebApplicationPath implements IResourceFinder
 
 	/** The web apps servlet context */
 	private final ServletContext servletContext;
-	
+
 	/** basePath of the project org/apache/wicket/arquillian/testing **/
 	private String basePath;
 
 	/**
 	 * Constructor
 	 * 
+	 * @param basePath
+	 *            basePath of the project org/apache/wicket/arquillian/testing
+	 * 
 	 * @param servletContext
 	 *            The webapplication context where the resources must be loaded from
 	 */
-	public ResourceWebApplicationPath(String basePath,final ServletContext servletContext)
+	public ResourceWebApplicationPath(String basePath, final ServletContext servletContext)
 	{
 		this.basePath = basePath.replaceAll("\\.", "\\/");
 		this.servletContext = servletContext;

http://git-wip-us.apache.org/repos/asf/wicket/blob/d11c4afa/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/ApacheLicenceHeaderTest.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/ApacheLicenceHeaderTest.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/ApacheLicenceHeaderTest.java
index ac5aa02..1a528c0 100644
--- a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/ApacheLicenceHeaderTest.java
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/ApacheLicenceHeaderTest.java
@@ -16,8 +16,6 @@
  */
 package org.apache.wicket.arquillian.testing;
 
-import java.util.Arrays;
-
 import org.apache.wicket.util.license.ApacheLicenseHeaderTestCase;
 
 /**

http://git-wip-us.apache.org/repos/asf/wicket/blob/d11c4afa/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java
index 9f2d146..4e906da 100644
--- a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/TestWicketJavaEEApplication.java
@@ -24,12 +24,14 @@ import org.apache.wicket.arquillian.testing.util.ResourceWebApplicationPath;
  * @author felipecalmeida
  * @since 06/20/2015
  */
-public class TestWicketJavaEEApplication extends WicketJavaEEApplication {
-  
+public class TestWicketJavaEEApplication extends WicketJavaEEApplication
+{
 	// Has some security ignores during the test (example: accept all roles).
-    
-    @Override
-    protected void initResourceFinder() {
-    	getResourceSettings().getResourceFinders().add(new ResourceWebApplicationPath(TestWicketJavaEEApplication.class.getPackage().getName(), getServletContext()));
-    }
+
+	@Override
+	protected void initResourceFinder()
+	{
+		getResourceSettings().getResourceFinders().add(new ResourceWebApplicationPath(
+			TestWicketJavaEEApplication.class.getPackage().getName(), getServletContext()));
+	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/d11c4afa/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java
index 9108d1e..2f0eac5 100644
--- a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/deployment/AbstractDeploymentTest.java
@@ -40,109 +40,143 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * <b>WARNING: If this error occurs - org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already running! Managed containers do not support connecting to running server instances due to the possible harmful effect of connecting to the wrong server. Please stop server before running or change to another type of container.
- *	To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration.</b>
- *	
- *	<b>SOLUTION: Search and kill wildfly or jboss proccess instance that are using port 8080.</b>
+ * <b>WARNING: If this error occurs -
+ * org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already
+ * running! Managed containers do not support connecting to running server instances due to the
+ * possible harmful effect of connecting to the wrong server. Please stop server before running or
+ * change to another type of container. To disable this check and allow Arquillian to connect to a
+ * running server, set allowConnectingToRunningServer to true in the container configuration.</b>
  * 
- * <b> If you can't run inside eclipse, add as source the folder src/test/resources and try again. </b>
+ * <b>SOLUTION: Search and kill wildfly or jboss proccess instance that are using port 8080.</b>
+ * 
+ * <b> If you can't run inside eclipse, add as source the folder src/test/resources and try
+ * again. </b>
  * 
  * @author felipecalmeida
  * @since 06/23/2015
- *
  */
 @Category(SlowTests.class)
-public abstract class AbstractDeploymentTest {
-	
+public abstract class AbstractDeploymentTest
+{
+
 	private static final Logger log = LoggerFactory.getLogger(AbstractDeploymentTest.class);
-	
+
 	private static final String WEBAPP_SRC = "src/main/webapp";
 	private static final String WEBAPP_TEST_SRC = "src/test/webapp";
 
+	/**
+	 * Creates a deployment for Arquillian.
+	 * 
+	 * @return the deployment webarchive
+	 */
 	@Deployment
-	public static WebArchive deployment() {
+	public static WebArchive deployment()
+	{
 		// Create webapp files from src/main/webapp. (WEB AS NORMAL)
-		GenericArchive webapp = ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class).importDirectory(WEBAPP_SRC).as(GenericArchive.class);
-		
+		GenericArchive webapp = ShrinkWrap.create(GenericArchive.class)
+			.as(ExplodedImporter.class)
+			.importDirectory(WEBAPP_SRC)
+			.as(GenericArchive.class);
+
 		// Create webapptest files from src/test/webapp. (TEST)
-		GenericArchive webappTest = ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class).importDirectory(WEBAPP_TEST_SRC).as(GenericArchive.class);
-		
+		GenericArchive webappTest = ShrinkWrap.create(GenericArchive.class)
+			.as(ExplodedImporter.class)
+			.importDirectory(WEBAPP_TEST_SRC)
+			.as(GenericArchive.class);
+
 		// Some configurations to create a manifest.mf.
 		ByteArrayAsset resource = new ByteArrayAsset("Dependencies: org.jboss.msc".getBytes());
-		
+
 		// Create libs from POM.XML.
 		File[] asFile = Maven.configureResolver()
-				// I'm not using internet directly, I have a Nexus Repository that handles the libs for me.
-				.workOffline().withMavenCentralRepo(false)
-				// Load everything from pom, that is compile and runtime, as a file and transitivity to don't loose anything and cause exceptions.
-				.loadPomFromFile("./pom.xml").importCompileAndRuntimeDependencies()
-				.resolve().withTransitivity().asFile();
-		
+			// I'm not using internet directly, I have a Nexus Repository that handles the libs for
+			// me.
+			.workOffline()
+			.withMavenCentralRepo(false)
+			// Load everything from pom, that is compile and runtime, as a file and transitivity to
+			// don't loose anything and cause exceptions.
+			.loadPomFromFile("./pom.xml")
+			.importCompileAndRuntimeDependencies()
+			.resolve()
+			.withTransitivity()
+			.asFile();
+
 		// Create the WAR.
 		return ShrinkWrap.create(WebArchive.class, "wicket-servletContext.war")
-						 // Add packages and/or classes.
-						 .addPackages(true, TestWicketJavaEEApplication.class.getPackage())
-						 // Add the persistence.xml
-						 .addAsResource("META-INF/persistence.xml")
-						 // Add a manifest.
-						 .addAsManifestResource(resource, "MANIFEST.MF")
-						 // Add WEBAPP files.
-						 .merge(webapp,"/",Filters.exclude(".*\\web.xml"))
-						 // Add WEBAPP TEST files.
-						 .merge(webappTest,"/",Filters.includeAll())
-						 // Add LIBS from POM.XML.
-						 .addAsLibraries(asFile);
+			// Add packages and/or classes.
+			.addPackages(true, TestWicketJavaEEApplication.class.getPackage())
+			// Add the persistence.xml
+			.addAsResource("META-INF/persistence.xml")
+			// Add a manifest.
+			.addAsManifestResource(resource, "MANIFEST.MF")
+			// Add WEBAPP files.
+			.merge(webapp, "/", Filters.exclude(".*\\web.xml"))
+			// Add WEBAPP TEST files.
+			.merge(webappTest, "/", Filters.includeAll())
+			// Add LIBS from POM.XML.
+			.addAsLibraries(asFile);
 	}
-	
+
 	protected WicketTester wicketTester;
-	
+
 	/**
 	 * Set a new instance of wicketTester.
 	 *
 	 * @param wicketTester
 	 */
-	public void setWicketTester(WicketTester wicketTester) {
+	public void setWicketTester(WicketTester wicketTester)
+	{
 		this.wicketTester = wicketTester;
 	}
-	
+
 	/**
-	 * Get an instance of wicketTester. The first time verify and create a new one.
+	 * Get an instance of WicketTester. The first time verify and create a new one.
 	 *
-	 * @return
+	 * @return a WicketTester
 	 */
-	public WicketTester getWicketTester() {
-		if(wicketTester == null) {
-			wicketTester = new WicketTester(useServletContextContainer(),false);
+	public WicketTester getWicketTester()
+	{
+		if (wicketTester == null)
+		{
+			wicketTester = new WicketTester(useServletContextContainer(), false);
 		}
 		return wicketTester;
 	}
-	
+
 	/**
 	 * Loading the TestWicketJavaEEApplication from src/test/webapp/WEB-INF/web.xml.
 	 * 
-	 * @return
+	 * @return the (test) WebApplication
 	 */
-	protected WebApplication useServletContextContainer() {
+	protected WebApplication useServletContextContainer()
+	{
 		WebApplication webApplication = null;
-		try {
+		try
+		{
 			webApplication = TestWicketJavaEEApplication.get();
-		} catch (Exception e) {
-			log.error("If not using arquillian, maybe org.apache.wicket.Application has a message for you " + e.getMessage());
-			// I didn't test it, just supposing that i'm not using arquillian, so should show this message.
-			assertEquals("There is no application attached to current thread " + Thread.currentThread().getName(), e.getMessage());
 		}
-		
+		catch (Exception e)
+		{
+			log.error(
+				"If not using arquillian, maybe org.apache.wicket.Application has a message for you " +
+					e.getMessage());
+			// I didn't test it, just supposing that i'm not using arquillian, so should show this
+			// message.
+			assertEquals("There is no application attached to current thread " +
+				Thread.currentThread().getName(), e.getMessage());
+		}
+
 		assertNotNull(webApplication);
-		
+
 		log.info("WebApplication Name: " + webApplication.getName());
-		
+
 		ServletContext servletContext = webApplication.getServletContext();
 		assertNotNull(servletContext);
 		log.info("ServletContext Name: " + servletContext.getServletContextName());
-		assertEquals("Wicket Arquillian WildFly Quickstart: Wicket TEST WAR",servletContext.getServletContextName());
-		
+		assertEquals("Wicket Arquillian WildFly Quickstart: Wicket TEST WAR",
+			servletContext.getServletContextName());
+
 		log.info("Server info: " + servletContext.getServerInfo());
 		return webApplication;
 	}
-
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/d11c4afa/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/pages/InsertContactTest.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/pages/InsertContactTest.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/pages/InsertContactTest.java
index b3c9230..3f69506 100644
--- a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/pages/InsertContactTest.java
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/pages/InsertContactTest.java
@@ -33,22 +33,27 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * <b>WARNING: If this error occurs - org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already running! Managed containers do not support connecting to running server instances due to the possible harmful effect of connecting to the wrong server. Please stop server before running or change to another type of container.
- *	To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration.</b>
- *	
- *	<b>SOLUTION: Search and kill wildfly or jboss proccess instance that are using port 8080.</b>
+ * <b>WARNING: If this error occurs -
+ * org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already
+ * running! Managed containers do not support connecting to running server instances due to the
+ * possible harmful effect of connecting to the wrong server. Please stop server before running or
+ * change to another type of container. To disable this check and allow Arquillian to connect to a
+ * running server, set allowConnectingToRunningServer to true in the container configuration.</b>
  * 
- * <b> If you can't run inside eclipse, add as source the folder src/test/resources and try again. </b>
+ * <b>SOLUTION: Search and kill wildfly or jboss proccess instance that are using port 8080.</b>
+ * 
+ * <b> If you can't run inside eclipse, add as source the folder src/test/resources and try
+ * again. </b>
  * 
  * Just a class test to show that everything is working.
  * 
  * @author felipecalmeida
  * @since 06/21/2015
- *
  */
+@SuppressWarnings("javadoc")
 @RunWith(Arquillian.class)
-public class InsertContactTest extends AbstractDeploymentTest {
-	
+public class InsertContactTest extends AbstractDeploymentTest
+{
 	private static final String EMAIL_IS_REQUIRED = "'email' is required.";
 
 	private static final String NAME_IS_REQUIRED = "'name' is required.";
@@ -66,50 +71,52 @@ public class InsertContactTest extends AbstractDeploymentTest {
 	private static final Logger log = LoggerFactory.getLogger(InsertContactTest.class);
 
 	@Inject
-    private ContactDao contactDao;
-	
+	private ContactDao contactDao;
+
 	@Test
-	public void testErrorMessagesInsertContact() {
+	public void testErrorMessagesInsertContact()
+	{
 		Class<InsertContact> pageClass = InsertContact.class;
 		getWicketTester().startPage(pageClass);
 		getWicketTester().assertRenderedPage(pageClass);
-		
+
 		FormTester formTester = getWicketTester().newFormTester(INSERT_FORM);
 		formTester.submit();
 		getWicketTester().assertErrorMessages(NAME_IS_REQUIRED, EMAIL_IS_REQUIRED);
 		log.info("Required Messages: " + NAME_IS_REQUIRED + " and " + EMAIL_IS_REQUIRED);
-		
+
 		getWicketTester().assertRenderedPage(pageClass);
 	}
-	
+
 	@Test
-	public void testInsertContact() {
+	public void testInsertContact()
+	{
 		Class<InsertContact> pageClass = InsertContact.class;
 		getWicketTester().startPage(pageClass);
 		getWicketTester().assertRenderedPage(pageClass);
-		
+
 		FormTester formTester = getWicketTester().newFormTester(INSERT_FORM);
 		formTester.setValue(NAME, WICKET_ARQUILLIAN_TEST);
 		formTester.setValue(EMAIL, WICKET_ARQUILLIAN_TEST_APACHE_ORG);
 		formTester.submit();
-		
+
 		getWicketTester().assertNoErrorMessage();
 		getWicketTester().assertRenderedPage(ListContacts.class);
-		
+
 		log.info("Retrieving contacts to assert:");
 		List<Contact> contacts = contactDao.getContacts();
 		int contactsSize = contacts.size();
 		assertEquals(1, contactsSize);
-		
+
 		Contact contact = contacts.get(0);
 		assertNotNull(contact.getId());
-		assertEquals(WICKET_ARQUILLIAN_TEST,contact.getName());
-		assertEquals(WICKET_ARQUILLIAN_TEST_APACHE_ORG,contact.getEmail());
-		
+		assertEquals(WICKET_ARQUILLIAN_TEST, contact.getName());
+		assertEquals(WICKET_ARQUILLIAN_TEST_APACHE_ORG, contact.getEmail());
+
 		log.info("Contacts size: " + contactsSize);
-		for (Contact infoContact : contacts) {
+		for (Contact infoContact : contacts)
+		{
 			log.info("Contacts info: " + infoContact);
 		}
 	}
-
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/d11c4afa/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java
----------------------------------------------------------------------
diff --git a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java
index a3ec33c..8cd20ed 100644
--- a/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java
+++ b/testing/wicket-arquillian/src/test/java/org/apache/wicket/arquillian/testing/servletcontext/ArquillianContainerProvidedTest.java
@@ -36,37 +36,46 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * <b>WARNING: If this error occurs - org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already running! Managed containers do not support connecting to running server instances due to the possible harmful effect of connecting to the wrong server. Please stop server before running or change to another type of container.
- *	To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration.</b>
- *	
- *	<b>SOLUTION: Search and kill wildfly or jboss proccess instance that are using port 8080.</b>
+ * <b>WARNING: If this error occurs -
+ * org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already
+ * running! Managed containers do not support connecting to running server instances due to the
+ * possible harmful effect of connecting to the wrong server. Please stop server before running or
+ * change to another type of container. To disable this check and allow Arquillian to connect to a
+ * running server, set allowConnectingToRunningServer to true in the container configuration.</b>
  * 
- * <b> If you can't run inside eclipse, add as source the folder src/test/resources and try again. </b>
+ * <b>SOLUTION: Search and kill wildfly or jboss proccess instance that are using port 8080.</b>
+ * 
+ * <b> If you can't run inside eclipse, add as source the folder src/test/resources and try
+ * again. </b>
  * 
  * @author felipecalmeida
  * @since 06/23/2015
- *
  */
+@SuppressWarnings("javadoc")
 @RunWith(Arquillian.class)
-public class ArquillianContainerProvidedTest extends AbstractDeploymentTest {
-
-	private static final Logger log = LoggerFactory.getLogger(ArquillianContainerProvidedTest.class);
+public class ArquillianContainerProvidedTest extends AbstractDeploymentTest
+{
+	private static final Logger log = LoggerFactory
+		.getLogger(ArquillianContainerProvidedTest.class);
 
 	private static final String RESOURCE_PAGES_INSERT_CONTACT_HTML_NOT_FOUND = "Resource /pages/InsertContact.html not found.";
 
 	/**
-	 * Using container's servlet context and/or filter provided configured in web.xml and using Arquillian.
+	 * Using container's servlet context and/or filter provided configured in web.xml and using
+	 * Arquillian.
 	 */
 	@Test
 	public void testFindResourcesServletContextFromContainer() throws MalformedURLException
 	{
-		WebApplication webApplication =  useServletContextContainer();
-		setWicketTester(new WicketTester(webApplication, webApplication.getServletContext(), false));
+		WebApplication webApplication = useServletContextContainer();
+		setWicketTester(
+			new WicketTester(webApplication, webApplication.getServletContext(), false));
 		findResourcesServletContext();
 	}
-	
+
 	/**
-	 * Using container's servlet context and/or filter provided configured in web.xml and using Arquillian.
+	 * Using container's servlet context and/or filter provided configured in web.xml and using
+	 * Arquillian.
 	 */
 	@Test
 	public void testFindResourcesWebApplicationFromContainer() throws MalformedURLException
@@ -75,38 +84,48 @@ public class ArquillianContainerProvidedTest extends AbstractDeploymentTest {
 		setWicketTester(new WicketTester(webApplication, false));
 		findResourcesServletContext();
 	}
-	
+
 	/**
 	 * Creating another application and trying to reuse the ServletContext/Filter.
 	 */
 	@Test
-	public void testNewApplicationTryReuseServletContextFilter() {
-		try {
+	public void testNewApplicationTryReuseServletContextFilter()
+	{
+		try
+		{
 			log.info("Trying to reuse container's ServletContext/Filter.");
 			setWicketTester(new WicketTester(new TestWicketJavaEEApplication(), false));
 			fail("Should not be able to reuse the servlet context");
-		} catch (IllegalStateException e) {
-			assertEquals("servletContext is not set yet. Any code in your Application object that uses the wicket filter instance should be put in the init() method instead of your constructor", e.getMessage());
+		}
+		catch (IllegalStateException e)
+		{
+			assertEquals(
+				"servletContext is not set yet. Any code in your Application object that uses the wicket filter instance should be put in the init() method instead of your constructor",
+				e.getMessage());
 		}
 
 		assertNull(wicketTester);
 	}
-	
+
 	/**
 	 * Null application to test error.
 	 */
 	@Test
-	public void testNullApplication() {
-		try {
+	public void testNullApplication()
+	{
+		try
+		{
 			log.info("Trying to use a null application.");
 			setWicketTester(new WicketTester(null, false));
 			fail("WebApplication cannot be null");
-		} catch (IllegalArgumentException iax) {
+		}
+		catch (IllegalArgumentException iax)
+		{
 			assertEquals("Argument 'application' may not be null.", iax.getMessage());
 		}
 		assertNull(wicketTester);
 	}
-	
+
 	/**
 	 * Test with new application.
 	 */
@@ -116,16 +135,20 @@ public class ArquillianContainerProvidedTest extends AbstractDeploymentTest {
 		setWicketTester(new WicketTester(new TestWicketJavaEEApplication()));
 		assertNotNull(getWicketTester().getApplication());
 		log.info("Using mock servletcontext.");
-		log.info("WebApplication MOCK after wicketTester Name: " + getWicketTester().getApplication().getName());
-		log.info("ServletContext MOCK after wicketTester Name: " + getWicketTester().getServletContext().getServletContextName());
+		log.info("WebApplication MOCK after wicketTester Name: " +
+			getWicketTester().getApplication().getName());
+		log.info("ServletContext MOCK after wicketTester Name: " +
+			getWicketTester().getServletContext().getServletContextName());
 		log.info("Server info: " + getWicketTester().getServletContext().getServerInfo());
-		assertEquals("Wicket Mock Test Environment v1.0", getWicketTester().getServletContext().getServerInfo());
+		assertEquals("Wicket Mock Test Environment v1.0",
+			getWicketTester().getServletContext().getServerInfo());
 
 		// USING MOCK.
 		try
 		{
 			findResourcesServletContext();
-			fail("Should not be able to find '/pages/InsertContact.html' in the mocked servlet context");
+			fail(
+				"Should not be able to find '/pages/InsertContact.html' in the mocked servlet context");
 		}
 		catch (IllegalStateException isx)
 		{
@@ -139,12 +162,13 @@ public class ArquillianContainerProvidedTest extends AbstractDeploymentTest {
 	private void findResourcesServletContext() throws MalformedURLException
 	{
 		// Doing the same thing that ResourceWebApplicationPath does.
-		URL resource = getWicketTester().getServletContext().getResource("/pages/InsertContact.html");
-		if (resource == null) {
+		URL resource = getWicketTester().getServletContext()
+			.getResource("/pages/InsertContact.html");
+		if (resource == null)
+		{
 			throw new IllegalStateException(RESOURCE_PAGES_INSERT_CONTACT_HTML_NOT_FOUND);
 		}
 		log.info("Resource found " + resource.getFile());
 		assertTrue(resource.getFile().contains("/pages/InsertContact.html"));
 	}
-
 }