### Question:
Span { public String getSubstring(String input) { return input.substring(start, end); } Span(int start, int end); int length(); int middleValue(); Span copy(int offset); String getSubstring(String input); boolean inSpan(int i); final int start; final int end; }### Answer:
@Test public void substringTest() { Assert.assertEquals("", new Span(0, 0).getSubstring("hello")); Assert.assertEquals("h", new Span(0, 1).getSubstring("hello")); Assert.assertEquals("ello", new Span(1, 5).getSubstring("hello")); }