private int getNext() throws MyCheckedException {
        final int i = atomicSequence.next();
        if (i == 1) {
            throw new MyCheckedException();
        }
        return i;
    }
Alternate between returning zero or throwing a {@link MyCheckedException}
stroom-util/src/test/java/stroom/util/exception/TestThrowingSupplier.java