### Question:
ItemResponseFileSummary { public ItemResponseVector[] getCondensedResponseVectors(File f, int start, int nItems, boolean headerIncluded){ Frequency freq = new Frequency(); String responseString = ""; try{ BufferedReader br = new BufferedReader(new FileReader(f)); String line = ""; String[] s = null; if(headerIncluded) br.readLine(); while((line=br.readLine())!=null){ s = line.split(","); line = ""; for(int j=0;j<nItems;j++){ line += s[j+start]; } freq.addValue(line); } br.close(); }catch(IOException ex){ ex.printStackTrace(); } ItemResponseVector[] responseData = new ItemResponseVector[freq.getUniqueCount()]; ItemResponseVector irv = null; Iterator<Comparable<?>> iter = freq.valuesIterator(); int index = 0; byte[] rv = null; while(iter.hasNext()){ Comparable<?> value = iter.next(); responseString = value.toString(); int n=responseString.length(); rv = new byte[n]; String response = ""; for (int i = 0;i < n; i++){ response = String.valueOf(responseString.charAt(i)).toString(); rv[i] = Byte.parseByte(response); } irv = new ItemResponseVector(rv, Long.valueOf(freq.getCount(value)).doubleValue()); responseData[index] = irv; index++; } return responseData; } ItemResponseFileSummary(); ItemResponseVector[] getResponseVectors(String fileName, boolean headerIncluded); ItemResponseVector[] getResponseVectors(File f, boolean headerIncluded); ItemResponseVector[] getResponseVectors(File f, int start, int nItems, boolean headerIncluded); ItemResponseVector[] getCondensedResponseVectors(File f, int start, int nItems, boolean headerIncluded);  }### Answer:
@Test public void lsat7Test(){ System.out.println("LSAT7 file summary test"); double[] true_freq = {12,19,1,7,3,19,3,17,10,5,3,7,7,23,8,28,7,39,11,34,14,51,15,90,6,25,7,35,18,136,32,308}; File f = FileUtils.toFile(this.getClass().getResource("/testdata/lsat7-expanded.txt")); ItemResponseFileSummary fileSummary = new ItemResponseFileSummary(); ItemResponseVector[] data = fileSummary.getCondensedResponseVectors(f, 0, 5, true); for(int i=0;i<data.length;i++){ assertEquals("LSAT7 frequency: ", true_freq[i], data[i].getFrequency(), 1e-15); } }