### Question:
CorbaFixedHandler extends CorbaObjectHandler { public CorbaFixedHandler(QName fixedName, QName fixedIdlType, TypeCode fixedTC, Object fixedType) { super(fixedName, fixedIdlType, fixedTC, fixedType); if (fixedType instanceof Fixed) { digits = ((Fixed)fixedType).getDigits(); scale = ((Fixed)fixedType).getScale(); } else if (fixedType instanceof Anonfixed) { digits = ((Anonfixed)fixedType).getDigits(); scale = ((Anonfixed)fixedType).getScale(); } else { digits = 0; scale = 0; } } CorbaFixedHandler(QName fixedName, QName fixedIdlType, TypeCode fixedTC, Object fixedType); long getDigits(); long getScale(); BigDecimal getValue(); String getValueData(); void setValue(BigDecimal val); void setValueFromData(String data); void clear();  }### Answer:
@Test public void testCorbaFixedHandler() { Fixed fixedType = new Fixed(); fixedType.setName("FixedType"); fixedType.setDigits(3); fixedType.setScale(2); QName fixedName = new QName(fixedType.getName()); QName fixedIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "FixedType", CorbaConstants.NP_WSDL_CORBA); TypeCode fixedTC = orb.create_fixed_tc((short)fixedType.getDigits(), (short)fixedType.getScale()); CorbaFixedHandler obj = new CorbaFixedHandler(fixedName, fixedIdlType, fixedTC, fixedType); assertNotNull(obj); java.math.BigDecimal value = new java.math.BigDecimal(123.45); obj.setValue(value); assertEquals(value, obj.getValue()); String valueData = obj.getValueData(); assertEquals(valueData, value.toString()); assertTrue(fixedType.getDigits() == obj.getDigits()); assertTrue(fixedType.getScale() == obj.getScale()); }
@Test public void testCorbaFixedHandler() { Fixed fixedType = new Fixed(); fixedType.setName("FixedType"); fixedType.setDigits(3); fixedType.setScale(2); QName fixedName = new QName(fixedType.getName()); QName fixedIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "FixedType", CorbaConstants.NP_WSDL_CORBA); TypeCode fixedTC = orb.create_fixed_tc((short)fixedType.getDigits(), (short)fixedType.getScale()); CorbaFixedHandler obj = new CorbaFixedHandler(fixedName, fixedIdlType, fixedTC, fixedType); assertNotNull(obj); java.math.BigDecimal value = new java.math.BigDecimal(123.45); obj.setValue(value); assertTrue(value.equals(obj.getValue())); String valueData = obj.getValueData(); assertTrue(valueData.equals(value.toString())); assertTrue(fixedType.getDigits() == obj.getDigits()); assertTrue(fixedType.getScale() == obj.getScale()); }