### Question:
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.BOOLEAN) public Boolean toBoolean(Boolean value, String sourceFormat, String targetFormat) { return value != null ? Boolean.valueOf(value) : null; }  @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.DECIMAL) BigDecimal toBigDecimal(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.BIG_INTEGER) BigInteger toBigInteger(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.BOOLEAN) Boolean toBoolean(Boolean value, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.BYTE) Byte toByte(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.CHAR) Character toCharacter(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.DOUBLE) Double toDouble(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.FLOAT) Float toFloat(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.INTEGER) Integer toInteger(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.LONG) Long toLong(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.NUMBER) Number toNumber(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.SHORT) Short toShort(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.STRING, concerns = { AtlasConversionConcern.CONVENTION }) String toString(Boolean value, String sourceFormat, String targetFormat);  }### Answer:
@Test public void convertToBoolean() { Boolean t = Boolean.TRUE; Boolean f = Boolean.FALSE; Boolean t2 = converter.toBoolean(t, null, null); Boolean f2 = converter.toBoolean(f, null, null); assertNotNull(t2); assertEquals(t2, t); assertTrue(t2); assertNotNull(f2); assertEquals(f2, f); assertFalse(f2); }
@Test public void convertToBooleanNull() { Boolean t = null; Boolean t2 = converter.toBoolean(t, null, null); assertNull(t2); }