### Question:
TimePattern { public void setIncrement(int interval, int from) { validateWithinBounds(interval, String.format("Interval should be within bounds [ %d, %d ]", mLowerBound, mHigherBound)); validateWithinBounds(from, String.format("From should be within bounds [ %d, %d ]", mLowerBound, mHigherBound)); mPattern.setLength(0); mPattern.append(String.valueOf(interval)) .append("/") .append(String.valueOf(from)); } TimePattern(int lowerBound, int higherBound); void setRange(int start, int end); @Override String toString(); void setValue(int value); void setIncrement(int interval, int from); void setRawValue(String rawValue); String parse(String rawValue);  }### Answer:
@Test public void should_not_accept_interval_that_less_than_lower_bound() throws Exception { expected.expect(IllegalArgumentException.class); expected.expectMessage("Interval should be within bounds [ 0, 59 ]"); mTimePattern.setIncrement(-10, 5); }
@Test public void should_not_accept_interval_that_more_than_upper_bound() throws Exception { expected.expect(IllegalArgumentException.class); expected.expectMessage("Interval should be within bounds [ 0, 59 ]"); mTimePattern.setIncrement(100, -5); }
@Test public void should_not_accept_from_that_less_than_lower_bound() throws Exception { expected.expect(IllegalArgumentException.class); expected.expectMessage("From should be within bounds [ 0, 59 ]"); mTimePattern.setIncrement(0, -5); }
@Test public void should_not_accept_from_that_more_than_upper_bound() throws Exception { expected.expect(IllegalArgumentException.class); expected.expectMessage("From should be within bounds [ 0, 59 ]"); mTimePattern.setIncrement(0, 100); }