### Question:
RomanConverter { static int convertRomanToArabicNumber(String roman) { roman = roman.toUpperCase(); int sum = 0; int current = 0; int previous = 0; for (int index = roman.length() - 1; index >= 0; index--) { if (doesSymbolsContainsRomanCharacter(roman, index)) { current = getSymbolValue(roman, index); if (current < previous) { sum -= current; } else { sum += current; } previous = current; } else { throw new IllegalArgumentException( String.format("Invalid roman character %s ", getCharValue(roman, index))); } } return sum; } private  RomanConverter();   }### Answer:
@Test void convertI() { assertEquals(1, convertRomanToArabicNumber("I"), "Roman I should equal to 1"); }
@Test void convertMCMXCVI() { assertEquals(1996, convertRomanToArabicNumber("MCMXCVI"), "Roman MCMXCVI should equal to " + "1996"); }
@Test void convertInvalidRomanValue() { assertThrows( IllegalArgumentException.class, () -> convertRomanToArabicNumber("Z"), "Invalid roman character Z Should throw (IllegalArgumentException)"); }
@Test void convertVII() { assertEquals(7, convertRomanToArabicNumber("vii"), "Roman VII should equal to 7"); }
@Test void convertII() { assertEquals(2, convertRomanToArabicNumber("II"), "Roman II should equal to 2"); }
@Test void convertIII() { assertEquals(3, convertRomanToArabicNumber("III"), "Roman III should equal to 3"); }
@Test void convertV() { assertEquals(5, convertRomanToArabicNumber("V"), "Roman V should equal to 5"); }
@Test void convertVI() { assertEquals(6, convertRomanToArabicNumber("VI"), "Roman VI should equal to 6"); }
@Test void convertIV() { assertEquals(4, convertRomanToArabicNumber("IV"), "Roman IV should equal to 4"); }
@Test void convertX() { assertEquals(10, convertRomanToArabicNumber("X"), "Roman X should equal to 10"); }
@Test void convertIX() { assertEquals(9, convertRomanToArabicNumber("IX"), "Roman IX should equal to 9"); }
@Test void convertXXXVI() { assertEquals(36, convertRomanToArabicNumber("XXXVI"), "Roman XXXVI should equal to 36"); }
@Test void convertMMXII() { assertEquals(2012, convertRomanToArabicNumber("MMXII"), "Roman MMXII should equal to 2012"); }