Make isTooBig a member variable for testing purposes
Add tx as argument to calculateFee as it cannot work without it
Make newDecoratedTx function replaceable for testing
Remove arguments as they can be passed in the closure