"http".equals(engine.getProtocol()));
engine = new JettyHTTPServerEngine();
engine.setPort(PORT2);
engine.setMaxIdleTime(30000);
engine.setTlsServerParameters(new TLSServerParameters());
engine.finalizeConfig();
List<JettyHTTPServerEngine> list = new ArrayList<JettyHTTPServerEngine>();
list.add(engine);
factory.setEnginesList(list);
engine = factory.createJettyHTTPServerEngine(PORT2, "https");
JettyHTTPTestHandler handler1 = new JettyHTTPTestHandler("string1", true);
// need to create a servant to create the connector
engine.addServant(new URL("https://localhost:" + PORT2 + "/test"), handler1);
assertTrue("Protocol must be https",
"https".equals(engine.getProtocol()));
assertEquals("Get the wrong maxIdleTime.", 30000, engine.getConnector().getMaxIdleTime());
factory.setTLSServerParametersForPort(PORT1, new TLSServerParameters());
engine = factory.createJettyHTTPServerEngine(PORT1, "https");
assertTrue("Protocol must be https",
"https".equals(engine.getProtocol()));
factory.setTLSServerParametersForPort(PORT3, new TLSServerParameters());
engine = factory.createJettyHTTPServerEngine(PORT3, "https");
assertTrue("Protocol must be https",
"https".equals(engine.getProtocol()));
JettyHTTPServerEngineFactory.destroyForPort(PORT1);