### Question:
BooleanConverter implements Converter<Boolean, String> { public String convertToSap(final Boolean javaValue) { if (javaValue == null) { throw new ConversionException("Java value is null"); } if (!(javaValue instanceof Boolean)) { throw new ConversionException("Expected: " + Boolean.class.getName() + " but was: " + javaValue.getClass().getName()); } return TRUE.equals(javaValue) ? "X" : ""; }  Boolean convertToJava(final String sapValue); String convertToSap(final Boolean javaValue);  }### Answer:
@Test public void testConvertToSap() { assertEquals("X", converter.convertToSap(true)); assertEquals("", converter.convertToSap(false)); assertConversionExceptionToSap(null); }