@Test
public void getArrayComponentType() {

    // not array
    assertNull(ClassUtil.getArrayComponentType(null));
    assertNull(ClassUtil.getArrayComponentType(int.class));
    assertNull(ClassUtil.getArrayComponentType(Object.class));
    assertEquals(ClassUtilTest.class, ClassUtil.getArrayComponentType(ClassUtilTest[].class));
    assertEquals(ClassUtilTest.class, ClassUtil.getArrayComponentType(ClassUtilTest[][].class));
    assertEquals(ClassUtilTest.class, ClassUtil.getArrayComponentType(ClassUtilTest[][][].class));
    assertEquals(int.class, ClassUtil.getArrayComponentType(int[].class));
    assertEquals(int.class, ClassUtil.getArrayComponentType(int[][].class));
    assertEquals(int.class, ClassUtil.getArrayComponentType(int[][][].class));
    assertEquals(Integer.class, ClassUtil.getArrayComponentType(Integer[].class));
    assertEquals(Integer.class, ClassUtil.getArrayComponentType(Integer[][].class));
    assertEquals(Integer.class, ClassUtil.getArrayComponentType(Integer[][][].class));
    assertNotEquals(Integer.class, ClassUtil.getArrayComponentType(int[].class));
    assertNotEquals(Integer.class, ClassUtil.getArrayComponentType(int[][].class));
    assertNotEquals(Integer.class, ClassUtil.getArrayComponentType(int[][][].class));
}