"submit echo;";
@Test
public void testSubmittingDISPEL() throws Exception
{
Gateway g = GatewayFactory.get(GATEWAY_ADDRESS);
GatewayProcess p = g.submit(DISPEL_REQUEST);
try
{
p.waitForResults();
Map<String, Result> results = p.getResults();
Result result = results.get("results");
assertNotNull(result);
String resultStr = Util.getAsString(result);
assertEquals("Received wrong result", "[Hello World2!]", resultStr);
Errors e = p.getErrors();
assertNull("Caught a compile time error", e.getCompiletime());
assertNull("Caught a runtime error", e.getRuntime());
assertNull("Caught a registration error", e.getRegistration());
assertNull("Caught a system error", e.getSystem());
assertEquals(ProcessingStatus.COMPLETED, p.getStatus());
// list all processes and check that this one in the list
List<String> processes = g.getGatewayProcesses();
boolean contained = false;
for (String process : processes)
{
if (p.getAddress().endsWith(process))
{