public static Object convert(Class<?> expectedClass, Object originalObject) {
        if (originalObject == null) {
            return null;
        }
        Class<?> currentClass = originalObject.getClass();
        if (expectedClass.isAssignableFrom(currentClass)) {
            return originalObject;
        }
        if (PrimitiveBoxedUtils.areSameWithBoxing(expectedClass, originalObject.getClass())) {
            // No cast/transformation originalObject
            return originalObject;
        }
        if (expectedClass == String.class) {
            return originalObject.toString();
        }
        Object toReturn;
        String currentClassName = currentClass.getName();
        switch (currentClassName) {
            case "java.lang.String":
                toReturn = convertFromString(expectedClass, (String) originalObject);
                break;
            case "int":
            case "java.lang.Integer":
                toReturn = convertFromInteger(expectedClass, (Integer) originalObject);
                break;
            case "double":
            case "java.lang.Double":
                toReturn = convertFromDouble(expectedClass, (Double) originalObject);
                break;
            case "float":
            case "java.lang.Float":
                toReturn = convertFromFloat(expectedClass, (Float) originalObject);
                break;
            default:
                throw new KiePMMLException(String.format(FAILED_CONVERSION, originalObject,
                                                         expectedClass.getName()));
        }
        return toReturn;
    }
@Test
    void convertConvertibleFromInteger() {
        CONVERTIBLE_FROM_INTEGER.forEach((s, expected) -> {
            Class<?> expectedClass = expected.getClass();
            Object retrieved = ConverterTypeUtil.convert(expectedClass, s);
            assertThat(retrieved).isEqualTo(expected);
        });
    }