### Question:
ClassInspectionService { private Integer detectArrayDimensions(Class<?> clazz) { Integer arrayDim = Integer.valueOf(0); if (clazz == null) { return null; } if (!clazz.isArray()) { return arrayDim; } arrayDim++; Class<?> tmpClazz = clazz.getComponentType(); while (tmpClazz != null && tmpClazz.isArray() && arrayDim < MAX_ARRAY_DIM_LIMIT) { arrayDim++; tmpClazz = tmpClazz.getComponentType(); } return arrayDim; }  List<String> getMapClasses(); List<String> getListClasses(); List<String> getClassNameBlacklist(); List<String> getFieldBlacklist(); Boolean getDisableProtectedOnlyFields(); void setDisableProtectedOnlyFields(Boolean disableProtectedOnlyFields); Boolean getDisablePackagePrivateOnlyFields(); void setDisablePackagePrivateOnlyFields(Boolean disablePackagePrivateOnlyFields); Boolean getDisablePrivateOnlyFields(); void setDisablePrivateOnlyFields(Boolean disablePrivateOnlyFields); Boolean getDisablePublicOnlyFields(); void setDisablePublicOnlyFields(Boolean disablePublicOnlyFields); Boolean getDisablePublicGetterSetterFields(); void setDisablePublicGetterSetterFields(Boolean disablePublicGetterSetterFields); JavaClass inspectClass(String className, CollectionType collectionType, String collectionClassName); JavaClass inspectClass(ClassLoader classLoader, String className, CollectionType collectionType, String collectionClassName); JavaClass inspectClass(String className, CollectionType collectionType, String collectionClassName, String classpath); JavaClass inspectClass(Class<?> clazz, CollectionType collectionType, String collectionClassName); JavaClass inspectClass(ClassLoader classLoader, Class<?> clazz, CollectionType collectionType, String collectionClassName); void setConversionService(AtlasConversionService atlasConversionService); static final int MAX_REENTRY_LIMIT; static final int MAX_ARRAY_DIM_LIMIT; }### Answer:
@Test public void testDetectArrayDimensions() { assertNull(null, classInspectionService.inspectClass(String.class, CollectionType.NONE, null).getArrayDimensions()); assertEquals(new Integer(1), classInspectionService.inspectClass(int[].class, CollectionType.ARRAY, null).getArrayDimensions()); assertEquals(new Integer(2), classInspectionService.inspectClass(String[][].class, CollectionType.ARRAY, null).getArrayDimensions()); assertEquals(new Integer(3), classInspectionService.inspectClass(List[][][].class, CollectionType.ARRAY, null).getArrayDimensions()); assertEquals(new Integer(4), classInspectionService.inspectClass(Map[][][][].class, CollectionType.ARRAY, null).getArrayDimensions()); assertEquals(new Integer(64), classInspectionService.inspectClass( int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][].class, CollectionType.ARRAY, null) .getArrayDimensions()); assertEquals(new Integer(255), classInspectionService.inspectClass( int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][].class, CollectionType.ARRAY, null) .getArrayDimensions()); }