Added tests for calculate_coins