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