StringToOptionalConverter implements StringConverter<Optional> { @Override public Optional convert(String source) { return ofNullable(source); }  @Override Optional convert(String source); @Override int getPriority();  }
@Test public void testConvert() { assertEquals(Optional.of("1"), converter.convert("1")); assertEquals(Optional.empty(), converter.convert(null)); }