### Question:
Utils { public static Object buildArray(String internalName, int length) throws ClassNotFoundException { return buildArray(internalName, length, Utils.class.getClassLoader()); }  static Object buildArray(String internalName, int length); static Object buildArray(String internalName, int length, ClassLoader classLoader); static List<String> builderTypeListToTypeNames(BuilderTypeList typeList); static String buildFieldDescriptor(Field field); static Object castToPrimitive(Object value, String targetType); static String getArrayDimensionString(Object array); static Double getDoubleValue(Object obj); static List<File> getFilesWithSmaliExtension(File file); static Float getFloatValue(Object obj); static Integer getIntegerValue(Object obj); static MethodLocation[] getLocations(BuilderInstruction... instructions); static Long getLongValue(Object obj); static MethodLocation getNextLocation(MethodLocation location, TIntObjectMap<MethodLocation> addressToLocation); static List<String> getParameterTypes(String methodDescriptor); static int getRegisterSize(BuilderTypeList typeList); static int getRegisterSize(Class<?>[] parameterTypes); static int getRegisterSize(List<String> typeNames); static int getRegisterSize(String typeName); static Set<String> getDeclaredAndValueTypeNames(HeapItem item); static void shiftIntegerMapKeys(int startKey, int shift, TIntObjectMap<T> intToObject);  }### Answer:
@Test public void buildArrayOf1DPrimitiveClassArrayReturnsExpected() throws ClassNotFoundException { String arrayType = "[I"; int length = 1 + rng.nextInt(100); int[] expected = new int[length]; Object actual = Utils.buildArray(arrayType, length); assertArrayEquals(expected, (int[]) actual); }
@Test public void buildArrayOf2DPrimitiveClassArrayReturnsExpected() throws ClassNotFoundException { String arrayType = "[[I"; int length = 1 + rng.nextInt(100); int[][] expected = new int[length][]; Object actual = Utils.buildArray(arrayType, length); assertArrayEquals(expected, (int[][]) actual); }
@Test public void buildArrayOf3DNonLocalClassArrayReturnsExpected() throws ClassNotFoundException { String arrayType = "[[[Ljava/lang/String;"; int length = 1 + rng.nextInt(100); String[][][] expected = new String[length][][]; Object actual = Utils.buildArray(arrayType, length); assertArrayEquals(expected, (String[][][]) actual); }