### Question:
InetAddressConverter implements ValueConverter<InetAddress> { public InetAddress convert( String value ) { try { return InetAddress.getByName( value ); } catch ( UnknownHostException e ) { throw new ValueConversionException( message( value ) ); } }  InetAddress convert( String value ); Class<InetAddress> valueType(); String valuePattern();  }### Answer:
@Test public void localhost() throws Exception { assumeTrue( InetAddress.getByName( "127.0.0.1" ).isReachable( 5000 ) ); assertEquals( "127.0.0.1", converter.convert( "localhost" ).getHostAddress() ); }
@Test( expected = ValueConversionException.class ) public void unknownHost() { converter.convert( "!(@&#()!*@&#" ); }