FixValue implements FixNode { public T getValue() { return value; } FixValue(FixType type, T value);  FixValue(String name);  FixValue(String name, FixType type);  FixValue(String name, FixType type, T value); @SuppressWarnings("unchecked") void assign(FixValue<?> operand); @SuppressWarnings("rawtypes") @Override boolean equals(Object obj); @Override String getName(); FixType getType(); T getValue(); @Override int hashCode(); void setValue(T value); @Override String toString();  }
@Test public void testAddFloat() { FixValue<BigDecimal> op1 = new FixValue<BigDecimal>("op1", FixType.floatType, BigDecimal.valueOf(3)); FixValue<BigDecimal> op2 = new FixValue<BigDecimal>("op2", FixType.floatType, BigDecimal.valueOf(4)); assertEquals(BigDecimal.valueOf(7), fixValueOperations.add.apply(op1, op2).getValue()); }
@Test public void testAddIntFloat() { FixValue<BigDecimal> op1 = new FixValue<BigDecimal>("op1", FixType.floatType, BigDecimal.valueOf(3)); FixValue<Integer> op2 = new FixValue<Integer>("op2", FixType.intType, 4); assertEquals(BigDecimal.valueOf(7), fixValueOperations.add.apply(op1, op2).getValue()); }
@Test public void testAddTimeDuration() { FixValue<Instant> op1 = new FixValue<Instant>("op1", FixType.UTCTimestamp, Instant.now()); FixValue<Duration> op2 = new FixValue<Duration>("op2", FixType.Duration, Duration.ofSeconds(30)); assert(fixValueOperations.add.apply(op1, op2).getValue() instanceof Instant); }
@Test public void testAddInt() { FixValue<Integer> op1 = new FixValue<Integer>("op1", FixType.intType, 3); FixValue<Integer> op2 = new FixValue<Integer>("op2", FixType.intType, 4); assertEquals(Integer.valueOf(7), fixValueOperations.add.apply(op1, op2).getValue()); }