### Question:
ConverterUtils { public static Object convertValueToType(Class<?> fieldType, String formattedValue, String columnName, int rowNum) { Object value = null; if (fieldType == String.class) { value = String.valueOf(formattedValue); } else if (fieldType == LocalDateTime.class) { return Converters.toLocalDateTime.convert(formattedValue, columnName, rowNum); } else if (fieldType == LocalDate.class) { return Converters.toLocalDate.convert(formattedValue, columnName, rowNum); } else if (fieldType == java.sql.Date.class) { return Converters.toSqlDate.convert(formattedValue, columnName, rowNum); } else if (fieldType == Timestamp.class) { return Converters.toSqlTimestamp.convert(formattedValue, columnName, rowNum); } else if (fieldType == Integer.class || fieldType == int.class) { return Converters.toInteger.convert(formattedValue, columnName, rowNum); } else if (fieldType == Long.class || fieldType == long.class) { return Converters.toLong.convert(formattedValue, columnName, rowNum); } else if (fieldType == Double.class || fieldType == double.class) { return Converters.toDouble.convert(formattedValue, columnName, rowNum); } else if (fieldType == Float.class || fieldType == float.class) { return Converters.toFloat.convert(formattedValue, columnName, rowNum); } else if (fieldType == Boolean.class) { return Converters.toBoolean.convert(formattedValue, columnName, rowNum); } return value; } ConverterUtils(); static Object convertValueToType(Class<?> fieldType, String formattedValue, String columnName, int rowNum);  }### Answer:
@Test public void testConvertValuesToString() { assertEquals("Hello", convertValueToType(String.class, "Hello", "A", 1)); assertEquals("HELLO", convertValueToType(String.class, "HELLO", "A", 1)); assertEquals("1.0", convertValueToType(String.class, "1.0", "A", 1)); assertEquals("2019-01-01", convertValueToType(String.class, "2019-01-01", "A", 1)); }