### Question:
IbftConfigOptions { public long getEpochLength() { return JsonUtil.getLong(ibftConfigRoot, "epochlength", DEFAULT_EPOCH_LENGTH); } IbftConfigOptions(final ObjectNode ibftConfigRoot); long getEpochLength(); int getBlockPeriodSeconds(); int getRequestTimeoutSeconds(); int getGossipedHistoryLimit(); int getMessageQueueLimit(); int getDuplicateMessageLimit(); int getFutureMessagesLimit(); int getFutureMessagesMaxDistance(); Optional<String> getMiningBeneficiary(); BigInteger getBlockRewardWei(); static final IbftConfigOptions DEFAULT; }### Answer:
@Test public void shouldGetEpochLengthFromConfig() { final IbftConfigOptions config = fromConfigOptions(singletonMap("EpochLength", 10_000)); assertThat(config.getEpochLength()).isEqualTo(10_000); }
@Test public void shouldFallbackToDefaultEpochLength() { final IbftConfigOptions config = fromConfigOptions(emptyMap()); assertThat(config.getEpochLength()).isEqualTo(EXPECTED_DEFAULT_EPOCH_LENGTH); }
@Test public void shouldGetDefaultEpochLengthFromDefaultConfig() { assertThat(IbftConfigOptions.DEFAULT.getEpochLength()).isEqualTo(EXPECTED_DEFAULT_EPOCH_LENGTH); }