SubstringGrabber implements GrabberIF<Object, String> { public SubstringGrabber(int begin_index, int end_index) { this.begin_index = begin_index; this.end_index = end_index; } SubstringGrabber(int begin_index, int end_index); @Override String grab(Object object);  }
@Test public void testSubstringGrabber() { String str = "Jazz is NOT dead, it JUST SMELLS funny"; testGrabber(new SubstringGrabber(2, 5).grab(str), str.substring(2, 5), str.substring(1,4)); testGrabber(new SubstringGrabber(0, 10).grab(str), str.substring(0, 10), str.substring(1, 10)); testGrabber(new SubstringGrabber(2, str.length()).grab(str), str.substring(2, str.length()), str.substring(2, str.length() - 1)); }