@Test public void execute_executionIsCreated() throws Exception { HashMapObjectSource os = new HashMapObjectSource(); executor.execute(KEY_EXE_HELLO, os); Execution re = os.get(KEY_EXECUTION); Assert.assertEquals(os, re.getObjectSource()); Assert.assertEquals(KEY_EXE_HELLO, re.getExecutable().getName()); Assert.assertNull(re.getExecuteException()); }
@Test public void execute_exceptionIsCaughtIfExceptionInterceptorNotNull() throws Exception { HashMapObjectSource os = new HashMapObjectSource(); executor.execute("helloThrow", os); Execution re = os.get(KEY_EXECUTION); Assert.assertTrue( (re.getExecuteException().getCause() instanceof UnsupportedOperationException)); }