MegabyteCountRolloverCondition implements RolloverCondition { public void setMegabyteCountThreshold(long megabyteCountThreshold) { validate(megabyteCountThreshold); this.megabyteCountThreshold = megabyteCountThreshold; } MegabyteCountRolloverCondition(long megabyteCountThreshold); long getMegabyteCountThreshold(); void setMegabyteCountThreshold(long megabyteCountThreshold); @Override boolean isRolloverReady(PacketBuffer packetBuffer); @Override void accept(Visitor visitor); @Override String toString(); static final long MIN_VALUE; static final long MAX_VALUE; }
@Test(expected = IllegalArgumentException.class) public void testSetterUnderflow() { condition.setMegabyteCountThreshold(MegabyteCountRolloverCondition.MIN_VALUE - 1); }
@Test(expected = IllegalArgumentException.class) public void testSetterOverflow() { condition.setMegabyteCountThreshold(MegabyteCountRolloverCondition.MAX_VALUE + 1); }