ObjectExecutorThread extends Thread { private Object execute() throws SemanticError, NoresourceError, NoauthorizationError, BadFetchError, UnsupportedObjectnameError { final ObjectTag tag = (ObjectTag) object.getNode(); final Object invocationTarget = getInvocationTarget(tag); if (LOGGER.isDebugEnabled()) { LOGGER.debug("try to execute: '" + invocationTarget.getClass().getName() + "'"); } final String method; try { method = getMethodName(tag); } catch (URISyntaxException e) { throw new SemanticError("Must specify attribute a valid URI for: " + ObjectTag.ATTRIBUTE_CLASSID); } return targetExecute(invocationTarget, method); } ObjectExecutorThread(final VoiceXmlInterpreterContext ctx,
            final ObjectFormItem item); @Override void run();  }
@Test(timeout = 2000) public void testExecute() throws Exception, JVoiceXMLEvent { final VoiceXmlDocument doc = new VoiceXmlDocument(); final Vxml vxml = doc.getVxml(); final Form form = vxml.appendChild(Form.class); final ObjectTag object = form.appendChild(ObjectTag.class); object.setName("test"); object.setClassid(TestObjectExecutorThread.class); final ObjectFormItem item = new ObjectFormItem(context, object); final Dialog dialog = new ExecutablePlainForm(); dialog.setNode(form); final EventBus eventbus = context.getEventBus(); eventbus.subscribe("", this); final ObjectExecutorThread executor = new ObjectExecutorThread(context, item); executor.start(); synchronized (lock) { lock.wait(); } Assert.assertNotNull("no event received", event); Assert.assertTrue("expected an object result", event instanceof ObjectTagResultEvent); final ObjectTagResultEvent result = (ObjectTagResultEvent) event; Assert.assertEquals(STRING_VALUE, result.getInputResult()); }