diff --git a/src/test/java/org/apache/commons/csv/CSVRecordTest.java b/src/test/java/org/apache/commons/csv/CSVRecordTest.java index 41c8222e..fa3a5989 100644 --- a/src/test/java/org/apache/commons/csv/CSVRecordTest.java +++ b/src/test/java/org/apache/commons/csv/CSVRecordTest.java @@ -60,20 +60,15 @@ public class CSVRecordTest { 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 = IllegalStateException.class) + public void testGetStringNoHeader() { + record.get("first"); } @Test(expected = IllegalArgumentException.class) @@ -81,6 +76,11 @@ public class CSVRecordTest { assertNull(recordWithHeader.get(EnumFixture.UNKNOWN_COLUMN)); } + @Test(expected = IllegalArgumentException.class) + public void testGetUnmappedName() { + assertNull(recordWithHeader.get("fourth")); + } + @Test(expected = ArrayIndexOutOfBoundsException.class) public void testGetUnmappedNegativeInt() { assertNull(recordWithHeader.get(Integer.MIN_VALUE));