StringToDoubleConverter implements StringConverter<Double> { @Override public Double convert(String source) { return isNotEmpty(source) ? valueOf(source) : null; }  @Override Double convert(String source); @Override int getPriority();  }
@Test public void testConvert() { assertEquals(Double.valueOf("1.0"), converter.convert("1.0")); assertNull(converter.convert(null)); assertThrows(NumberFormatException.class, () -> { converter.convert("ttt"); }); }