public void setUp() throws IOException {
// Configure socket factories
SimpleSocketFactory serversocketfactory = null;
Protocol testhttp = null;
if (this.useSSL) {
serversocketfactory = new SimpleSSLSocketFactory();
testhttp = new Protocol("https",
(ProtocolSocketFactory)new SimpleSSLTestProtocolSocketFactory(), 443);
} else {
serversocketfactory = new SimplePlainSocketFactory();
testhttp = Protocol.getProtocol("http");