}
}
public void doTestBasic(String root) throws Exception
{
MuleClient client = muleContext.getClient();
MuleMessage result = client.send(root + "/helloworld", "", null);
assertEquals((Integer)200, result.getInboundProperty(HttpConnector.HTTP_STATUS_PROPERTY, 0));
assertEquals("Hello World", result.getPayloadAsString());
result = client.send(root + "/hello", "", null);
assertEquals((Integer)404, result.getInboundProperty(HttpConnector.HTTP_STATUS_PROPERTY, 0));
Map<String, Object> props = new HashMap<String, Object>();
props.put(HttpConnector.HTTP_METHOD_PROPERTY, HttpConstants.METHOD_GET);
result = client.send(root + "/helloworld", "", props);
assertEquals((Integer)405, result.getInboundProperty(HttpConnector.HTTP_STATUS_PROPERTY, 0));
props.put(HttpConnector.HTTP_METHOD_PROPERTY, HttpConstants.METHOD_DELETE);
result = client.send(root + "/helloworld", "", props);
assertEquals("Hello World Delete", result.getPayloadAsString());
assertEquals((Integer)200, result.getInboundProperty(HttpConnector.HTTP_STATUS_PROPERTY, 0));
}