CSVRecord implements Serializable, Iterable<String> { public String get(Enum<?> e) { return get(e.toString()); } CSVRecord(final String[] values, final Map<String, Integer> mapping,
            final String comment, final long recordNumber); String get(Enum<?> e); String get(final int i); String get(final String name); String getComment(); long getRecordNumber(); boolean isConsistent(); boolean isMapped(final String name); boolean isSet(final String name); Iterator<String> iterator(); int size(); @Override String toString();  }
@Test public void testGetInt() { assertEquals(values[0], record.get(0)); assertEquals(values[1], record.get(1)); assertEquals(values[2], record.get(2)); }
@Test public void testGetString() { assertEquals(values[0], recordWithHeader.get("first")); assertEquals(values[1], recordWithHeader.get("second")); assertEquals(values[2], recordWithHeader.get("third")); }
@Test(expected = IllegalStateException.class) public void testGetStringNoHeader() { record.get("first"); }
@Test(expected = IllegalArgumentException.class) public void testGetStringInconsistentRecord() { header.put("fourth", Integer.valueOf(4)); recordWithHeader.get("fourth"); }
@Test(expected = IllegalArgumentException.class) public void testGetUnmappedName() { assertNull(recordWithHeader.get("fourth")); }
@Test(expected = IllegalArgumentException.class) public void testGetUnmappedEnum() { assertNull(recordWithHeader.get(EnumFixture.UNKNOWN_COLUMN)); }
@Test(expected = ArrayIndexOutOfBoundsException.class) public void testGetUnmappedNegativeInt() { assertNull(recordWithHeader.get(Integer.MIN_VALUE)); }
@Test(expected = ArrayIndexOutOfBoundsException.class) public void testGetUnmappedPositiveInt() { assertNull(recordWithHeader.get(Integer.MAX_VALUE)); }