MaximumCountRule implements IEventBasedRule<Integer> { @Override public boolean shouldAllowFeedbackPromptByDefault() { return true; } MaximumCountRule(final int maximumCount); @Override boolean shouldAllowFeedbackPromptByDefault(); @Override boolean shouldAllowFeedbackPrompt(@NonNull final Integer cachedEventValue); @NonNull @Override String getDescription();  }
@SuppressLint("Assert") @SuppressWarnings("ConstantConditions") @Test public void testThatRuleAllowsPromptIfEventHasNeverOccurred() { final int anyPositiveInteger = 1; assert anyPositiveInteger > 0; final MaximumCountRule maximumCountRule = new MaximumCountRule(anyPositiveInteger); final boolean ruleShouldAllowFeedbackPrompt = maximumCountRule.shouldAllowFeedbackPromptByDefault(); assertTrue( "Feedback prompt should be allowed if the associated event has never occurred.", ruleShouldAllowFeedbackPrompt); }