Spark2BitcoinBlockCounter { public static Long reduceSumUpTransactions(Long a, Long b) { return a+b; } Spark2BitcoinBlockCounter(); static void main(String[] args); static void jobTotalNumOfTransactions(JavaSparkContext sc, Configuration hadoopConf, String inputFile, String outputFile); static Tuple2<String,Long> mapNoOfTransaction(BitcoinBlock block); static Long reduceSumUpTransactions(Long a, Long b);  }
@Test public void reduceSumUpTransactions() { Spark2BitcoinBlockCounter sparkTransformator = new Spark2BitcoinBlockCounter(); Long transactionCountA = new Long(1); Long transactionCountB = new Long(2); assertEquals((long)3,(long)sparkTransformator.reduceSumUpTransactions(transactionCountA,transactionCountB),"Transaction count should sum up to 3"); }