### Question:
IntegerValue extends Value implements Comparable, IIntegerOperations { public IntegerValue negateBitwise() throws Exception { IntegerValue result; if (getBigValue().equals(getMinValue().getBigValue())) { result = getMaxValue(); } else { result = negate().sub(ValueContainer.getBigIntegerValue(getType(), BigInteger.ONE)); } return invariantChecked(result); } IntegerValue(BigInteger bigInteger); private  IntegerValue(ASTNode type);  IntegerValue(ASTNode type, long value);  IntegerValue(String type, long value);  IntegerValue(ASTNode type, BigInteger value);  IntegerValue(ASTNode type, String value); boolean haveSmallValue(); BigInteger getBigValue(); @Override ASTNode getType(); static void setSuppressTypeAnnotations(boolean value); static boolean getSuppressTypeAnnotations(); @Override ASTNode toASTNode(boolean forJavaScript); @Override Object toJSONRepresentation(); @Override String toString(); int compareTo(Object other); int toInt(); IntegerValue getMinValue(); IntegerValue getMaxValue(); IntegerValue negate(); IntegerValue negateBitwise(); IntegerValue add(Value value); IntegerValue sub(Value value); IntegerValue div(Value value); IntegerValue mul(Value value); IntegerValue bitwiseOr(Value value); IntegerValue bitwiseAnd(Value value); IntegerValue bitwiseXor(Value value); IntegerValue bitwiseShiftLeft(Value value); IntegerValue bitwiseShiftRight(Value value); IntegerValue mod(Value value); IntegerValue exp(Value value); BoolValue isSmallerThan(Value value); BoolValue isSmallerThanOrEqualTo(Value value); BoolValue isGreaterThan(Value value); BoolValue isGreaterThanOrEqualTo(Value value); BoolValue isEqualTo(Value value); BoolValue isNotEqualTo(Value value); BytesValue convertToBytesType(ASTElementaryTypeName newType); AddressValue convertToAddressType(); IntegerValue convertToIntegerType(ASTElementaryTypeName newType);  }### Answer:
@Test public void negateBitwise() throws Exception { IntegerTestValues[] a = new IntegerTestValues[]{ new IntegerTestValues("int8", "60", true, 8, "-61"), new IntegerTestValues("int8", "100", true, 8, "-101"), new IntegerTestValues("int8", "-101", true, 8, "100"), new IntegerTestValues("int8", "-128", true, 8, "127"), new IntegerTestValues("int8", "0", true, 8, "-1"), new IntegerTestValues("uint8", "60", false, 8, "195"), new IntegerTestValues("uint8", "0", false, 8, "255"), new IntegerTestValues("uint8", "255", false, 8, "0") }; for (IntegerTestValues testData : a) { ASTNode type = TypeContainer.getIntegerType(testData.isSigned, testData.typeBits); IntegerValue value = new IntegerValue(type, testData.valueText); assert value.toString().equals(testData.valueText); IntegerValue resultValue = value.negateBitwise(); System.out.println("got " + resultValue + " wanted " + testData.operationResult); assert resultValue.toString().equals(testData.operationResult); } }