FeeTable { public UInt256 feeFor(Atom atom, Set<Particle> outputs, int feeSize) { UInt384 incrementalFees = UInt384.ZERO; for (FeeEntry entry : this.feeEntries) { incrementalFees = incrementalFees.add(entry.feeFor(atom, feeSize, outputs)); } if (!incrementalFees.getHigh().isZero()) { throw new ArithmeticException("Fee overflow"); } UInt256 incrementalFeeRequired = incrementalFees.getLow(); return this.minimumFee.compareTo(incrementalFeeRequired) > 0 ? this.minimumFee : incrementalFeeRequired; } private  FeeTable(UInt256 minimumFee, ImmutableList<FeeEntry> feeEntries); static FeeTable from(UInt256 minimumFee, ImmutableList<FeeEntry> feeEntries); UInt256 minimumFee(); ImmutableList<FeeEntry> feeEntries(); UInt256 feeFor(Atom atom, Set<Particle> outputs, int feeSize); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }
@Test public void testFeeForAtomMinimum() { FeeTable ft = get(); Atom a = Atom.create(ImmutableList.of()); UInt256 fee = ft.feeFor(a, ImmutableSet.of(), 0); assertEquals(UInt256.FIVE, fee); }