static <E extends Enum<E>> int electionStateChangeLength(final E from, final E to, final String reason)
    {
        return (2 * SIZE_OF_INT) + (6 * SIZE_OF_LONG) + stateTransitionStringLength(from, to) +
            trailingStringLength(reason, MAX_REASON_LENGTH);
    }
@Test
    void testElectionStateChangeLength()
    {
        final TimeUnit from = TimeUnit.DAYS;
        final TimeUnit to = TimeUnit.MICROSECONDS;
        final String payload = from.name() + STATE_SEPARATOR + to.name();
        final String reason = "this state transition occured in a test";

        assertEquals((2 * SIZE_OF_INT) + (6 * SIZE_OF_LONG) + SIZE_OF_INT + payload.length() +
            SIZE_OF_INT + reason.length(),
            electionStateChangeLength(from, to, reason));
    }