### Question:
ResFile { public void setSubBuffer(int start, int end) { if (start > end) { throw new InputMismatchException(); } else { startIdx = start; endIdx = end; } } ResFile();  ResFile(File file);  ResFile(String fileName); void streamBuffer(File file); void dumpBuffer(); void dumpBuffer(File newFile); void setSubBuffer(int start, int end); void setSubBuffer(String key1, String key2); void resetSubBuffer(); ArrayList queryKey(String key, int groupToReturn); ArrayList queryKey(String key); String parseStringValue(String key); int parseIntegerValue(String key); double parseDoubleValue(String key); ProductData.UTC parseDateTimeValue(String key); double parseTimeValue(final String key); double[][] parseOrbit(); File getResFile(); void setResFile(File resFile); int getStartIdx(); void setStartIdx(int startIdx); int getEndIdx(); void setEndIdx(int endIdx); StringBuffer getBuffer(); void setBuffer(StringBuffer buffer); @Override String toString(); static int hashCode(double x); @Override int hashCode(); @Override boolean equals(Object o);  }### Answer:
@Test public void testSetSubBuffer() throws Exception { resFile.setSubBuffer("Start_process_control", "End_process_control"); int idxStartExpected = 0; int idxEndExpected = processControlBlock.length(); Assert.assertEquals(idxStartExpected, resFile.getStartIdx()); Assert.assertEquals(idxEndExpected, resFile.getEndIdx()); Assert.assertEquals(processControlBlock, resFile.getBuffer().substring(resFile.getStartIdx(), resFile.getEndIdx())); }