### Question:
LongConverter implements TypeConverter<Long> { public Long convert(BigDecimal value) { return Long.valueOf(value.longValue()); } LongConverter(); Long convert(BigDecimal value); Long convert(Integer value); Long convert(BigInteger v); Long convert(Double v); Long convert(String value);  }### Answer:
@Test public void Integerからのconvertテスト() { Integer v = 255; Long expected = 255L; Long actual = new LongConverter().convert(v); assertEquals(expected, actual); }
@Test public void BigIntegerからのconvertテスト() { BigInteger f = new BigInteger("255"); Long expected = 255L; Long actual = new LongConverter().convert(f); assertEquals(expected, actual); }
@Test public void BigDecimalからのconvertテスト() { BigDecimal f = new BigDecimal("255"); Long expected = 255L; Long actual = new LongConverter().convert(f); assertEquals(expected, actual); }
@Test public void Stringからのconvertテスト1() { String s = "255"; Long expected = 255L; Long actual = new LongConverter().convert(s); assertEquals(expected, actual); }
@Test public void Stringからのconvertテスト2() { String s = null; Long expected = null; Long actual = new LongConverter().convert(s); assertEquals(expected, actual); }
@Test public void Stringからのconvertテスト3() { String s = ""; Long expected = null; Long actual = new LongConverter().convert(s); assertEquals(expected, actual); }