### Question:
IbftConfigOptions { public int getDuplicateMessageLimit() { return JsonUtil.getInt( ibftConfigRoot, "duplicatemessagelimit", DEFAULT_DUPLICATE_MESSAGE_LIMIT); } 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 shouldGetDuplicateMessageLimitFromConfig() { final IbftConfigOptions config = fromConfigOptions(singletonMap("DuplicateMessageLimit", 50)); assertThat(config.getDuplicateMessageLimit()).isEqualTo(50); }
@Test public void shouldFallbackToDefaultDuplicateMessageLimit() { final IbftConfigOptions config = fromConfigOptions(emptyMap()); assertThat(config.getDuplicateMessageLimit()) .isEqualTo(EXPECTED_DEFAULT_DUPLICATE_MESSAGE_LIMIT); }
@Test public void shouldGetDefaultDuplicateMessageLimitFromDefaultConfig() { assertThat(IbftConfigOptions.DEFAULT.getDuplicateMessageLimit()) .isEqualTo(EXPECTED_DEFAULT_DUPLICATE_MESSAGE_LIMIT); }