@Test public void when_client_activity_fails_without_server_failure_then_client_failure_should_be_reported() { doThrow(new RuntimeException("client")).when(activity).perform(); when(warpContext.getFirstNonSuccessfulResult()).thenReturn(null); try { executor.execute(activity, warpContext); fail("server execution should fail the request"); } catch (ActivityException e) { String message = e.getCause().getMessage(); if (!"client".equals(message)) { throw e; } } }
@Override public WarpResult execute(Activity activity, WarpContext warpContext) { try { setupServerInspection(); executeActivity(activity); awaitServerExecution(warpContext); checkActivityFailure(); return warpContext.getResult(); } finally { cleanup(); } }
DefaultWarpExecutor implements WarpExecutor { @Override public WarpResult execute(Activity activity, WarpContext warpContext) { try { setupServerInspection(); executeActivity(activity); awaitServerExecution(warpContext); checkActivityFailure(); return warpContext.getResult(); } finally { cleanup(); } } }
DefaultWarpExecutor implements WarpExecutor { @Override public WarpResult execute(Activity activity, WarpContext warpContext) { try { setupServerInspection(); executeActivity(activity); awaitServerExecution(warpContext); checkActivityFailure(); return warpContext.getResult(); } finally { cleanup(); } }  }
DefaultWarpExecutor implements WarpExecutor { @Override public WarpResult execute(Activity activity, WarpContext warpContext) { try { setupServerInspection(); executeActivity(activity); awaitServerExecution(warpContext); checkActivityFailure(); return warpContext.getResult(); } finally { cleanup(); } }  @Override WarpResult execute(Activity activity, WarpContext warpContext); }
DefaultWarpExecutor implements WarpExecutor { @Override public WarpResult execute(Activity activity, WarpContext warpContext) { try { setupServerInspection(); executeActivity(activity); awaitServerExecution(warpContext); checkActivityFailure(); return warpContext.getResult(); } finally { cleanup(); } }  @Override WarpResult execute(Activity activity, WarpContext warpContext);  }