### Question:
OpBehaviorFloatInt2Float extends UnaryOpBehavior { @Override public long evaluateUnary(int sizeout, int sizein, long in1) { FloatFormat format = FloatFormatFactory.getFloatFormat(sizeout); return format.opInt2Float(in1, sizein); } OpBehaviorFloatInt2Float(); @Override long evaluateUnary(int sizeout, int sizein, long in1); @Override BigInteger evaluateUnary(int sizeout, int sizein, BigInteger in1);  }### Answer:
@Test public void testEvaluateBinaryLong() { OpBehaviorFloatInt2Float op = new OpBehaviorFloatInt2Float(); FloatFormat ff = FloatFormatFactory.getFloatFormat(4); long result = op.evaluateUnary(4, 4, 2); Assert.assertEquals(0, result & 0xffffffff00000000L); Assert.assertEquals(2.0d, ff.getHostFloat(result), 0); result = op.evaluateUnary(4, 4, -2); Assert.assertEquals(0, result & 0xffffffff00000000L); Assert.assertEquals(-2.0d, ff.getHostFloat(result), 0); result = op.evaluateUnary(4, 4, 0); Assert.assertEquals(0, result & 0xffffffff00000000L); Assert.assertEquals(0d, ff.getHostFloat(result), 0); result = op.evaluateUnary(4, 4, 0x0ffffffffL); Assert.assertEquals(0, result & 0xffffffff00000000L); Assert.assertEquals(-1.0d, ff.getHostFloat(result), 0); }
@Test public void testEvaluateBinaryBigInteger() { OpBehaviorFloatInt2Float op = new OpBehaviorFloatInt2Float(); FloatFormat ff = FloatFormatFactory.getFloatFormat(4); BigInteger limit = BigInteger.ONE.shiftLeft(32); BigInteger result = op.evaluateUnary(4, 4, BigInteger.valueOf(2)); assertTrue(result.compareTo(limit) < 0); Assert.assertEquals(BigDecimal.valueOf(2.0d).stripTrailingZeros(), ff.getHostFloat(result)); result = op.evaluateUnary(4, 4, BigInteger.valueOf(-2)); assertTrue(result.compareTo(limit) < 0); Assert.assertEquals(BigDecimal.valueOf(-2.0d).stripTrailingZeros(), ff.getHostFloat(result)); result = op.evaluateUnary(4, 4, BigInteger.ZERO); assertTrue(result.compareTo(limit) < 0); Assert.assertEquals(BigDecimal.ZERO, ff.getHostFloat(result)); BigInteger NEG_ONE = Utils.bytesToBigInteger( new byte[] { (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff }, 4, false, false); result = op.evaluateUnary(4, 4, NEG_ONE); Assert.assertEquals(BigDecimal.valueOf(-1.0d).stripTrailingZeros(), ff.getHostFloat(result)); }