### Question:
ResFile { public double[][] parseOrbit() throws Exception { final String numStateVectorsKey = "NUMBER_OF_DATAPOINTS"; final int numberOfStateVectors = parseIntegerValue(numStateVectorsKey); final double[][] stateVectors = new double[numberOfStateVectors][4]; String stateVectorsPattern = "\\s*?(\\d+\\.\\d+)\\s*?(\\d+\\.\\d+)\\s*?(\\d+\\.\\d+)\\s*?(\\d+\\.\\d+)"; Matcher match = createMatcher(buffer.substring(startIdx, endIdx), stateVectorsPattern); int i = 0; while (match.find()) { try { stateVectors[i][0] = Double.parseDouble(match.group(1).trim()); stateVectors[i][1] = Double.parseDouble(match.group(2).trim()); stateVectors[i][2] = Double.parseDouble(match.group(3).trim()); stateVectors[i][3] = Double.parseDouble(match.group(4).trim()); i++; } catch (IndexOutOfBoundsException e) { logger.error("parseOrbit() : Exception handling regex : " + e.getLocalizedMessage()); } } if (i != numberOfStateVectors) { logger.error("parseOrbit() : inconsistency in number of defined and parsed state vectors"); throw new IllegalArgumentException("Cannot parse orbit : number of defined and parsed state vectors not the same"); } return stateVectors; } 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 testParseOrbit() throws Exception { double[][] expectedOrbit = {{22371.000000,2980481.384,5510209.440,3468130.655}, {22373.000000,2986908.023,5514837.160,3455264.837}, {22375.000000,2993323.103,5519439.182,3442383.979}, {22377.000000,2999726.590,5524015.487,3429488.137}}; resFile.setSubBuffer("_Start_precise_orbits", "End_precise_orbits"); double[][] returnedOrbit = resFile.parseOrbit(); for (int i = 0; i < returnedOrbit.length; i++) { for (int j = 0; j < returnedOrbit[0].length; j++) { double expectedDouble = expectedOrbit[i][j]; double returnedDouble = returnedOrbit[i][j]; Assert.assertEquals(expectedDouble, returnedDouble, delta); } } }