@Test public void fromAndTo() throws Exception { assertEquals((Integer) 1, converter.fromString("a")); assertEquals((Integer) 2, converter.fromString("b")); assertEquals("a", converter.toString(1)); assertEquals("b", converter.toString(2)); }
@Test(expected = IllegalArgumentException.class) public void unknownToString() throws Exception { converter.toString(3); }