### Question:
BytesValue extends Value implements IByteOperations { public BytesValue bitwiseShiftRight(Value value) throws Exception { IntegerValue shiftBits = (IntegerValue)value; byte[] result = new byte[type.getBytes()]; if (shiftBits.isGreaterThanOrEqualTo(ValueContainer.getBigIntegerValue(shiftBits.getType(), BigInteger.valueOf(256))).getValue()) { for (int i = 0; i < result.length; ++i) { result[i] = 0; } } else if (shiftBits.isSmallerThan(ValueContainer.getBigIntegerValue(shiftBits.getType(), BigInteger.ZERO)).getValue()) { throw new Exception("BytesValue.bitwiseShiftLeft with invalid negative count operand"); } else { BigInteger shiftedValue = integerValue.shiftRight(shiftBits.toInt()); bigIntegerValueToBytesArray(result, shiftedValue); } return new BytesValue(type, result); } BytesValue(ASTNode type, /*String*/ byte[] value); int getBytesCount(); @Override ASTNode getType(); @Override ASTNode toASTNode(boolean forJavaScript); String toHexConstantString(); @Override Object toJSONRepresentation(); BoolValue isEqualTo(BytesValue other); BoolValue isNotEqualTo(BytesValue other); BoolValue isSmallerThan(BytesValue value); BoolValue isSmallerThanOrEqualTo(BytesValue value); BoolValue isGreaterThan(BytesValue value); BoolValue isGreaterThanOrEqualTo(BytesValue value); BytesValue negateBitwise(); BytesValue bitwiseOr(Value otherValue); BytesValue bitwiseAnd(Value otherValue); BytesValue bitwiseXor(Value otherValue); BytesValue bitwiseShiftLeft(Value value); BytesValue bitwiseShiftRight(Value value); BytesValue indexAccess(Value index); IntegerValue length(); BytesValue convertToBytesType(ASTElementaryTypeName newType); IntegerValue convertToIntegerType(ASTElementaryTypeName newType);  }### Answer:
@Test public void bitwiseShiftRight() throws Exception { BytesTestValues[] a = new BytesTestValues[]{ new BytesTestValues("bytes3", new byte[]{b(0x30), b(0x00), b(0x00)}, new byte[]{20}, 3, new byte[]{b(0x00), b(0x00), b(0x03)}), new BytesTestValues("bytes3", new byte[]{b(0x30), b(0x00), b(0x00)}, new byte[]{100}, 3, new byte[]{b(0x00), b(0x00), b(0x00)}), }; for (BytesTestValues testData : a) { ASTElementaryTypeName sourceType = TypeContainer.getByteType(testData.typeBytes); BytesValue source = new BytesValue(sourceType, testData.valueArray); BytesValue expectedResult = new BytesValue(sourceType, testData.operationResult); BytesValue resultValue = source.bitwiseShiftRight(new IntegerValue("int", testData.secondValueArray[0])); String resultString = resultValue.toASTNode(false).toSolidityCode(); String expectedResultString = expectedResult.toASTNode(false).toSolidityCode(); System.out.println("got " + resultString + " wanted " + expectedResultString); assert resultString.equals(expectedResultString); } }