    @Test
    public void testEncryptBallot() throws Exception {

        initBallotCiphersProviderMock();

        StringBuilder sb = new StringBuilder();
        sb.append("GE;6699:9903");
        sb.append("370001;0;37000101;p=DEP");
        sb.append(Strings.repeat(";1001", 545));

        AuthenticatedBallot authenticatedBallot = ballotCipherService.encryptBallotThenWrapForAuthentication(sb.toString(), 1);

        assertThat("The encrypted ballot byte array length should be less than 4000 chars", authenticatedBallot.getAuthenticatedEncryptedBallot().length, lessThan(4000));
        assertThat("The encrypted ballot key should be 256 bytes long", authenticatedBallot.getWrappedKey().length, is(256));
        assertThat("The encryption authentication tag should be 128bit / 16 bytes long", authenticatedBallot.getTag().length, is(16));
        assertThat("The authenticated ballot should have the proper index attached", authenticatedBallot.getBallotIndex(), is(1));
    }