protected void assertBackAndForthSerialization(Strategy used) throws Exception {
assertBackAndForthSerialization(used, null);
}
protected void assertBackAndForthSerialization(Strategy used, String referenceValue) throws Exception {
DimensionDefaultValueSetting setting = new DimensionDefaultValueSetting();
setting.setStrategyType(used);
if (referenceValue != null){
setting.setReferenceValue(referenceValue);
}
DimensionInfo di = new DimensionInfoImpl();
di.setDefaultValue(setting);
Document diDOM = marshallToXML(di);
assertXpathExists("//defaultValue/strategy", diDOM);