// Path: src/main/java/io/github/novacrypto/base58/CapacityCalculator.java
// static int maximumBase58StringLength(final int byteLength) {
//     return (int) Math.ceil(byteLength * storageRatio);
// }
// 
// Path: src/test/java/io/github/novacrypto/base58/CapacityCalculatorTests.java
// static byte[] getBytesWithMaxValue(final int byteLength) {
//     final byte[] bytes = new byte[byteLength];
//     for (int i = 0; i < byteLength; i++) {
//         bytes[i] = (byte) 255;
//     }
//     return bytes;
// }


import org.junit.Test;
import static io.github.novacrypto.base58.CapacityCalculator.maximumBase58StringLength;
import static io.github.novacrypto.base58.CapacityCalculatorTests.getBytesWithMaxValue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
            capacitySet = characters;
            return sb::append;
        }
    }

    @Test
    public void sets_capacity_3bytes() {
        final CapacityTargetSpy spy = new CapacityTargetSpy();
        Base58.newSecureInstance().encode(getBytesWithMaxValue(3), spy, spy);
        assertEquals(maximumBase58StringLength(3), spy.capacityOnFirstAppend);
    }

    @Test
    public void sets_capacity_10bytes() {
        final CapacityTargetSpy spy = new CapacityTargetSpy();
        Base58.newSecureInstance().encode(new byte[10], spy, spy);
        assertEquals(maximumBase58StringLength(10), spy.capacityOnFirstAppend);
    }

    @Test
    public void sets_capacity_3bytes_single_argument_overload() {
        final CapacityTargetSpyFromCapacity spy = new CapacityTargetSpyFromCapacity();
        Base58.newSecureInstance().encode(getBytesWithMaxValue(3), spy);
        assertEquals(maximumBase58StringLength(3), spy.capacitySet);
    }

    @Test
    public void sets_capacity_10bytes_single_argument_overload() {
        final CapacityTargetSpyFromCapacity spy = new CapacityTargetSpyFromCapacity();
        Base58.newSecureInstance().encode(new byte[10], spy);
// Path: src/main/java/io/github/novacrypto/base58/CapacityCalculator.java
// static int maximumBase58StringLength(final int byteLength) {
//     return (int) Math.ceil(byteLength * storageRatio);
// }
// 
// Path: src/test/java/io/github/novacrypto/base58/CapacityCalculatorTests.java
// static byte[] getBytesWithMaxValue(final int byteLength) {
//     final byte[] bytes = new byte[byteLength];
//     for (int i = 0; i < byteLength; i++) {
//         bytes[i] = (byte) 255;
//     }
//     return bytes;
// }


// Path: src/test/java/io/github/novacrypto/base58/EncodeTargetCapacitySetTests.java
import org.junit.Test;
import static io.github.novacrypto.base58.CapacityCalculator.maximumBase58StringLength;
import static io.github.novacrypto.base58.CapacityCalculatorTests.getBytesWithMaxValue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

            capacitySet = characters;
            return sb::append;
        }
    }

    @Test
    public void sets_capacity_3bytes() {
        final CapacityTargetSpy spy = new CapacityTargetSpy();
        Base58.newSecureInstance().encode(getBytesWithMaxValue(3), spy, spy);
        assertEquals(maximumBase58StringLength(3), spy.capacityOnFirstAppend);
    }

    @Test
    public void sets_capacity_10bytes() {
        final CapacityTargetSpy spy = new CapacityTargetSpy();
        Base58.newSecureInstance().encode(new byte[10], spy, spy);
        assertEquals(maximumBase58StringLength(10), spy.capacityOnFirstAppend);
    }

    @Test
    public void sets_capacity_3bytes_single_argument_overload() {
        final CapacityTargetSpyFromCapacity spy = new CapacityTargetSpyFromCapacity();
        Base58.newSecureInstance().encode(getBytesWithMaxValue(3), spy);
        assertEquals(maximumBase58StringLength(3), spy.capacitySet);
    }

    @Test
    public void sets_capacity_10bytes_single_argument_overload() {
        final CapacityTargetSpyFromCapacity spy = new CapacityTargetSpyFromCapacity();
        Base58.newSecureInstance().encode(new byte[10], spy);
        assertEquals(maximumBase58StringLength(10), spy.capacitySet);