### Question:
OpBehaviorIntRem extends BinaryOpBehavior { @Override public long evaluateBinary(int sizeout, int sizein, long in1, long in2) { if (in2 == 0) { throw new LowlevelError("Remainder by 0"); } return Long.remainderUnsigned(in1, in2); } OpBehaviorIntRem(); @Override long evaluateBinary(int sizeout, int sizein, long in1, long in2); @Override BigInteger evaluateBinary(int sizeout, int sizein, BigInteger in1, BigInteger in2);  }### Answer:
@Test public void testEvaluateBinaryLong() { OpBehaviorIntRem op = new OpBehaviorIntRem(); Assert.assertEquals(0L, op.evaluateBinary(4, 4, 16, 2)); Assert.assertEquals(1L, op.evaluateBinary(4, 4, 17, 2)); Assert.assertEquals(1L, op.evaluateBinary(8, 8, 0xffffffffffffffffL, 2L)); }
@Test(expected = LowlevelError.class) public void testDivideByZeroLong() { OpBehaviorIntRem op = new OpBehaviorIntRem(); op.evaluateBinary(4, 4, 1, 0); }
@Test public void testEvaluateBinaryBigInteger() { OpBehaviorIntRem op = new OpBehaviorIntRem(); Assert.assertEquals(BigInteger.TWO, op.evaluateBinary(16, 16, new BigInteger("fffffffffffffffffffffffffffffff2", 16), BigInteger.TWO.add(BigInteger.TWO))); }
@Test(expected = LowlevelError.class) public void testDivideByZeroBigInteger() { OpBehaviorIntRem op = new OpBehaviorIntRem(); op.evaluateBinary(16, 16, BigInteger.ONE, BigInteger.ZERO); }