public void errorInvocation() {
final IdentifierMap identifierMap = new InMemoryIdentifierMap ();
final DirectFudgeConnection conduit = new DirectFudgeConnection(s_fudgeContext);
final CollectingFudgeMessageReceiver messages = new CollectingFudgeMessageReceiver();
conduit.getEnd2().setFudgeMessageReceiver(messages);
final RemoteNodeClient client = new RemoteNodeClient(conduit.getEnd1(), new CompiledFunctionService (new InMemoryFunctionRepository (), new CachingFunctionRepositoryCompiler(), new FunctionCompilationContext ()), new InMemoryIdentifierMap (), new FunctionInvocationStatisticsSender ());
final SimpleCalculationNode failingNode = new TestCalculationNode() {
@Override
public CalculationJobResult executeJob(CalculationJob job) {
throw new OpenGammaRuntimeException ("Remote node not working");
}
};
assertEquals(0, messages.getMessages().size());
client.addNode(failingNode);
assertEquals(0, messages.getMessages().size());
client.start();
assertEquals(1, messages.getMessages().size());
final FudgeMsgEnvelope readyMsgEnvelope = messages.getMessages().get(0);
messages.clear();
final FudgeDeserializer dcontext = new FudgeDeserializer(s_fudgeContext);
final FudgeSerializer scontext = new FudgeSerializer(s_fudgeContext);