### Question:
IntegerConverter implements AtlasConverter<Integer> { @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.CHAR, concerns = { AtlasConversionConcern.RANGE, AtlasConversionConcern.CONVENTION }) public Character toCharacter(Integer value) throws AtlasConversionException { if (value == null) { return null; } if (value < Character.MIN_VALUE || value > Character.MAX_VALUE) { throw new AtlasConversionException(String .format("Integer %s is greater than Character.MAX_VALUE or less than Character.MIN_VALUE", value)); } return Character.valueOf((char) value.intValue()); }  @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.DECIMAL) BigDecimal toBigDecimal(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.BIG_INTEGER) BigInteger toBigInteger(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.BOOLEAN, concerns = { AtlasConversionConcern.CONVENTION }) Boolean toBoolean(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.BYTE, concerns = AtlasConversionConcern.RANGE) Byte toByte(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.CHAR, concerns = { AtlasConversionConcern.RANGE, AtlasConversionConcern.CONVENTION }) Character toCharacter(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.DATE_TIME) Date toDate(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.DOUBLE) Double toDouble(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.FLOAT, concerns = AtlasConversionConcern.RANGE) Float toFloat(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.INTEGER) Integer toInteger(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.DATE) LocalDate toLocalDate(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.TIME) LocalTime toLocalTime(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.DATE_TIME) LocalDateTime toLocalDateTime(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.LONG) Long toLong(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.SHORT, concerns = AtlasConversionConcern.RANGE) Short toShort(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.STRING) String toString(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.NUMBER) Number toNumber(Integer value); @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.DATE_TIME_TZ) ZonedDateTime toZonedDateTime(Integer value);  }### Answer:
@Test public void convertToCharacterNull() throws Exception { Character character = converter.toCharacter(null); assertNull(character); }
@Test public void convertToCharacter() throws Exception { Integer integer = new Integer(4); Character character = converter.toCharacter(integer); assertNotNull(character); int revert = character.charValue(); assertEquals(integer, new Integer(revert)); }
@Test(expected = AtlasConversionException.class) public void convertToCharacterGreaterThanMAX() throws Exception { Integer integer = 1500000; converter.toCharacter(integer); }
@Test(expected = AtlasConversionException.class) public void convertToCharacterLessThanMIN() throws Exception { Integer integer = -1500000; converter.toCharacter(integer); }