public static String revertValue(Object cleanValue) {
        if (cleanValue == null) {
            return "null";
        }

        Class<?> clazz = cleanValue.getClass();

        if (clazz.isAssignableFrom(String.class)) {
            return String.valueOf(cleanValue);
        } else if (clazz.isAssignableFrom(BigDecimal.class)) {
            return String.valueOf(cleanValue);
        } else if (clazz.isAssignableFrom(BigInteger.class)) {
            return String.valueOf(cleanValue);
        } else if (clazz.isAssignableFrom(Boolean.class) || clazz.isAssignableFrom(boolean.class)) {
            return Boolean.toString((Boolean) cleanValue);
        } else if (clazz.isAssignableFrom(Byte.class) || clazz.isAssignableFrom(byte.class)) {
            return String.valueOf(cleanValue);
        } else if (clazz.isAssignableFrom(Character.class) || clazz.isAssignableFrom(char.class)) {
            return String.valueOf(cleanValue);
        } else if (clazz.isAssignableFrom(Double.class) || clazz.isAssignableFrom(double.class)) {
            return revertDouble((Double) cleanValue);
        } else if (clazz.isAssignableFrom(Float.class) || clazz.isAssignableFrom(float.class)) {
            return cleanValue + "f";
        } else if (clazz.isAssignableFrom(Integer.class) || clazz.isAssignableFrom(int.class)) {
            return Integer.toString((Integer) cleanValue);
        } else if (clazz.isAssignableFrom(LocalDate.class)) {
            LocalDate localDate = (LocalDate) cleanValue;
            return String.format("%04d-%02d-%02d", localDate.getYear(), localDate.getMonthValue(), localDate.getDayOfMonth());
        } else if (clazz.isAssignableFrom(LocalDateTime.class)) {
            return formatLocalDateTime((LocalDateTime) cleanValue);
        } else if (clazz.isAssignableFrom(LocalTime.class)) {
            return formatLocalTime((LocalTime) cleanValue);
        }
        else if (clazz.isAssignableFrom(Long.class) || clazz.isAssignableFrom(long.class)) {
            return Long.toString((Long) cleanValue);
        } else if (clazz.isAssignableFrom(Short.class) || clazz.isAssignableFrom(short.class)) {
            return String.valueOf(cleanValue);
              } else if (Enum.class.isAssignableFrom(clazz)) {
            return String.valueOf(cleanValue);
        } else {
            return String.valueOf(cleanValue);
        }
    }
@Test
    public void revertValue_manyCases() {
        assertThat(revertValue("Test")).isEqualTo("Test");
        assertThat(revertValue(BigDecimal.valueOf(10000.83))).isEqualTo("10000.83");
        assertThat(revertValue(BigDecimal.valueOf(10000))).isEqualTo("10000");
        assertThat(revertValue(BigInteger.valueOf(10000))).isEqualTo("10000");
        assertThat(revertValue(Boolean.FALSE)).isEqualTo("false");
        assertThat(revertValue(Boolean.TRUE)).isEqualTo("true");
        assertThat(revertValue(false)).isEqualTo("false");
        assertThat(revertValue(true)).isEqualTo("true");
        assertThat(revertValue(1)).isEqualTo("1");
        assertThat(revertValue(new Integer(1))).isEqualTo("1");
        assertThat(revertValue(1L)).isEqualTo("1");
        assertThat(revertValue(new Long(1))).isEqualTo("1");
        assertThat(revertValue(1.1d)).isEqualTo("1.1d");
        assertThat(revertValue(new Double(1.1))).isEqualTo("1.1d");
        assertThat(revertValue(Double.NaN)).isEqualTo("NaN");
        assertThat(revertValue(Double.POSITIVE_INFINITY)).isEqualTo("Infinity");
        assertThat(revertValue(Double.NEGATIVE_INFINITY)).isEqualTo("-Infinity");
        assertThat(revertValue(1.1f)).isEqualTo("1.1f");
        assertThat(revertValue(new Float(1.1))).isEqualTo("1.1f");
        assertThat(revertValue('a')).isEqualTo("a");
        assertThat(revertValue(new Character('a'))).isEqualTo("a");
        assertThat(revertValue((short) 1)).isEqualTo("1");
        assertThat(revertValue("0".getBytes()[0])).isEqualTo(String.valueOf("0".getBytes()[0]));
        assertThat(revertValue(new Byte("0".getBytes()[0]))).isEqualTo(String.valueOf("0".getBytes()[0]));
        assertThat(revertValue(null)).isEqualTo("null");
        assertThat(revertValue(LocalDate.of(2018, 10, 20))).isEqualTo("2018-10-20");
        assertThat(revertValue(LocalDateTime.of(2018, 10, 20, 2, 13))).isEqualTo("2018-10-20T02:13:00");
        assertThat(revertValue(LocalDateTime.of(2018, 10, 20, 2, 13, 3))).isEqualTo("2018-10-20T02:13:03");
        assertThat(revertValue(LocalDateTime.of(2018, 10, 20, 2, 13, 3, 9999))).isEqualTo("2018-10-20T02:13:03.000009999");
        assertThat(revertValue(LocalTime.of(2, 13))).isEqualTo("02:13:00");
        assertThat(revertValue(LocalTime.of(2, 13, 3))).isEqualTo("02:13:03");
        assertThat(revertValue(LocalTime.of(2, 13, 3, 9999))).isEqualTo("02:13:03.000009999");
        assertThat(revertValue(EnumTest.FIRST)).isEqualTo("FIRST");
    }