StringToBooleanConverter implements StringConverter<Boolean> { @Override public Boolean convert(String source) { return isNotEmpty(source) ? valueOf(source) : null; }  @Override Boolean convert(String source); @Override int getPriority();  }
@Test public void testConvert() { assertTrue(converter.convert("true")); assertTrue(converter.convert("true")); assertTrue(converter.convert("True")); assertFalse(converter.convert("a")); assertNull(converter.convert("")); assertNull(converter.convert(null)); }