### Question:
BooleanConverter implements Converter<Boolean> { @Override public Boolean convert(String toBeConverted) { if (toBeConverted == null || toBeConverted.isEmpty()) { return null; } return Boolean.valueOf(toBeConverted); }  @Override Boolean convert(String toBeConverted);  }### Answer:
@Test public void trueIsConvertedToTrue() throws Exception { Boolean converted = converter.convert("true"); assertTrue(converted); }
@Test public void falseIsConvertedToFalse() throws Exception { Boolean converted = converter.convert("false"); assertFalse(converted); }
@Test public void nullIsConvertedToNull() throws Exception { Boolean converted = converter.convert(null); assertNull(converted); }
@Test public void emptyIsConvertedToNull() throws Exception { Boolean converted = converter.convert(""); assertNull(converted); }
@Test public void anythingElseIsConvertedToFalse() throws Exception { Boolean converted = converter.convert("something"); assertFalse(converted); }