FileData implements Serializable { public SortedMap<Integer, Integer> getAllCountersValue() { SortedMap<Integer, Integer> result = new TreeMap<Integer, Integer>(); byte[] rec1 = records.get(1); if (rec1 == null) { throw new NoSuchElementException("Record #1 is not set."); } int length = rec1.length - (rec1.length % 3); for (int i = 0, c = 1; i < length; i += 3, c++) { result.put(c, ByteArrayUtil.threeBytesToInt(rec1, i)); } return result; } FileData();   FileData(FileData source); SortedMap<Integer, byte[]> getAllRecordsContent(); byte[] getContent(); byte[] getContent(int numRecord); byte[] getContent(int numRecord, int dataOffset, int dataLength); int getContentAsCounterValue(int numCounter); SortedMap<Integer, Integer> getAllCountersValue(); @Override String toString();  }
@Test(expected = NoSuchElementException.class) public void getAllCountersValue_whenRecordIsNotSet_shouldThrowNSEE() { file.getAllCountersValue(); }