public void testMath() { Function<Integer> addition = Function.add(1, 2, 3, 4, 5); IntegerProperty sum = IntegerProperty.fromFunction(addition, "sum"); testMath(sum, 15); Function<Integer> subtraction = Function.subtract(100, 30, 20); IntegerProperty difference = IntegerProperty.fromFunction(subtraction, "difference"); testMath(difference, 50); Function<Integer> multiplcation = Function.multiply(1, 2, 3, 4, 5); IntegerProperty product = IntegerProperty.fromFunction(multiplcation, "product"); testMath(product, 120); Function<Integer> division = Function.divide(1000, 10, 5); IntegerProperty quotient = IntegerProperty.fromFunction(division, "quotient"); testMath(quotient, 20); Function<Integer> modulus = Function.modulo(512, 9); IntegerProperty remainder = IntegerProperty.fromFunction(modulus, "remainder"); testMath(remainder, 8); Function<Integer> bitAnd = Function.bitwiseAnd(0xcafe0000, 0xba00, 0xbe); IntegerProperty and = IntegerProperty.fromFunction(bitAnd, "bitAnd"); testMath(and, 0); Function<Integer> bitOr = Function.bitwiseOr(0xcafe0000, 0xba00, 0xbe); IntegerProperty or = IntegerProperty.fromFunction(bitOr, "bitOr"); testMath(or, 0xcafebabe); }