Range { public Range setEmpty() { this.lower = 0; this.upper = 0; return this; } Range();  Range(int lower, int upper);  Range(Range range); @Override boolean equals(Object o); @Override int hashCode(); int length(); Range set(int lower, int upper); Range set(Range range); Range setEmpty(); boolean isEmpty(); public int lower; public int upper; }
@Test public void testSetEmpty() throws Exception { Range range = new Range(1, 2); range.setEmpty(); assertEquals("lower", 0, range.lower); assertEquals("upper", 0, range.upper); }