SimpleModuleInterpreterActor extends AbstractModuleInterpreterActor { private void failure(Throwable throwable) throws InterpreterException { throw throwable instanceof InterpreterException ? (InterpreterException) throwable : new InterpreterException(getAbsoluteTrace(), "Executor failed unexpectedly.", throwable); } private  SimpleModuleInterpreterActor(Factory factory); @Override void preStart(); @Override void postStop(); @Override void onReceive(Object message);  }
@Test public void failure() { assert executionTrace != null; try (ModuleInterpretation moduleInterpretation = testCaseBuilder("successfulExecution").build()) { Props props = moduleInterpretation.toSimpleModuleInterpreterProps(MODULE_ID, bitSetOf(), bitSetOf(0)); TestActorRef<SimpleModuleInterpreterActor> actorRef = TestActorRef.create( moduleInterpretation.getActorSystem(), props, moduleInterpretation.getSupervisor()); SimpleModuleExecutorResult executionResult = new SimpleModuleExecutorResult.Builder( Name.qualifiedName(SimpleModuleExecutorResult.class.getName())) .setException(new ExecutionException(EXPECTED_MSG)) .build(); try { actorRef.receive(executionResult); Assert.fail(); } catch (Exception exception) { InterpreterException interpreterException = (InterpreterException) exception; Assert.assertEquals(interpreterException.getExecutionTrace(), ExecutionTrace.copyOf(executionTrace)); ExecutionException cause = (ExecutionException) interpreterException.getCause(); Assert.assertEquals(cause.getMessage(), EXPECTED_MSG); } } }