### Question:
IbftConfigOptions { public int getBlockPeriodSeconds() { return JsonUtil.getInt(ibftConfigRoot, "blockperiodseconds", DEFAULT_BLOCK_PERIOD_SECONDS); } 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 shouldGetBlockPeriodFromConfig() { final IbftConfigOptions config = fromConfigOptions(singletonMap("BlockPeriodSeconds", 5)); assertThat(config.getBlockPeriodSeconds()).isEqualTo(5); }
@Test public void shouldFallbackToDefaultBlockPeriod() { final IbftConfigOptions config = fromConfigOptions(emptyMap()); assertThat(config.getBlockPeriodSeconds()).isEqualTo(EXPECTED_DEFAULT_BLOCK_PERIOD); }
@Test public void shouldGetDefaultBlockPeriodFromDefaultConfig() { assertThat(IbftConfigOptions.DEFAULT.getBlockPeriodSeconds()) .isEqualTo(EXPECTED_DEFAULT_BLOCK_PERIOD); }