### Question:
IntegerConverter implements AtlasConverter<Integer> { @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.BYTE, concerns = AtlasConversionConcern.RANGE) public Byte toByte(Integer value) throws AtlasConversionException { if (value == null) { return null; } if (value >= Byte.MIN_VALUE && value <= Byte.MAX_VALUE) { return value.byteValue(); } throw new AtlasConversionException(new AtlasUnsupportedException( String.format("Integer %s is greater than Byte.MAX_VALUE or less than Byte.MIN_VALUE", value))); }  @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 convertToByte() throws Exception { Byte value = (byte) 100; assertEquals(value, converter.toByte(100)); }
@Test(expected = AtlasConversionException.class) public void convertToByteOutOfRange() throws Exception { converter.toByte(Integer.MAX_VALUE); }
@Test public void convertToByteNull() throws Exception { Byte byt = converter.toByte(null); assertNull(byt); }