@Test
public void testMapBoxedType() throws Exception {

    ServiceContext serviceContext = ServiceContextManager.getServiceContext(getClass().getClassLoader());
    PropertyConverterManager manager = new PropertyConverterManager(serviceContext, false);
    Class[] boxed = new Class[]{
        Integer[].class, Short[].class, Byte[].class, Long[].class,
        Boolean[].class, Character[].class, Float[].class, Double[].class
    };
    Class[] primitive = new Class[]{
        int[].class, short[].class, byte[].class, long[].class,
        boolean[].class, char[].class, float[].class, double[].class
    };
    Method method = PropertyConverterManager.class.getDeclaredMethod("mapBoxedType", TypeLiteral.class);
    method.setAccessible(true);
    for (int i = 0; i < boxed.length; i++) {
        assertThat(TypeLiteral.of(boxed[i]))
                .isEqualTo(method.invoke(manager, TypeLiteral.of(primitive[i])));
        assertThat(TypeLiteral.of(boxed[i].getComponentType()))
                .isEqualTo(method.invoke(manager, TypeLiteral.of(primitive[i].getComponentType())));
    }
}