static JettyServer jetty;
@BeforeClass
public static void setUp() throws Exception {
// Start test composite on a Tuscany node
final NodeFactory nf = NodeFactory.newInstance();
node = nf.createNode(new Contribution("test", here()));
node.start();
// Mock up a test Web service on http://localhost:8086/wsupper
jetty = new JettyServer((ExtensionPointRegistry)nf.getExtensionPointRegistry());
jetty.start();
jetty.addServletMapping("http://localhost:8086/wsupper", new HttpServlet() {
private static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
assertTrue(read(req.getInputStream()).contains("Hello SOAP"));