ViewCalculationConfiguration calcConfig = new ViewCalculationConfiguration(viewDef, "Test config");
calcConfig.addPortfolioRequirementName("SecType", "Req1");
calcConfig.addPortfolioRequirementName("SecType", "Req2");
calcConfig.addPortfolioRequirementName("SecType2", "Req1");
calcConfig.addSpecificRequirement(new ValueRequirement("Req3", ComputationTargetType.PRIMITIVE, UniqueId.of("Scheme2", "USD")));
calcConfig.getDeltaDefinition().setNumberComparer(new NumberDeltaComparer(2));
viewDef.addViewCalculationConfiguration(calcConfig);
FudgeMsgEnvelope viewDefMsg = _fudgeContext.toFudgeMsg(viewDef);
ViewDefinition deserializedViewDef = _fudgeContext.fromFudgeMsg(ViewDefinition.class, viewDefMsg.getMessage());