public EventJournalConfig setCapacity(int capacity) {
        checkPositive(capacity, "capacity can't be smaller than 1");
        this.capacity = capacity;
        return this;
    }
@Test(expected = UnsupportedOperationException.class)
    public void testReadOnlyClass_setCapacity_throwsException() {
        getReadOnlyConfig().setCapacity(27);
    }