{
int httpResponseCode = hconn.getResponseCode();
// Supposes that <= 199 is not bad, but is it? See http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
if (httpResponseCode >= 400 && httpResponseCode < 500)
{
throw new ConfigurationException("Unable to connect to Tomcat manager. "
+ "The server command (" + command + ") failed with responseCode ("
+ httpResponseCode + ") and responseMessage (" + hconn.getResponseMessage() + ").\n\n"
+ "Please make sure that you provided correct credentials to an user which is able to access Tomcat manager application.\n"
+ "These credentials can be specified in the Arquillian container configuration as \"user\" and \"pass\" properties.\n"
+ "The user must have appripriate role specified in tomcat-users.xml file.\n");