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