### Question:
Utils { public static List<String> builderTypeListToTypeNames(BuilderTypeList typeList) { return typeList.stream().map(BuilderTypeReference::getType).collect(Collectors.toCollection(LinkedList::new)); }  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 builderTypeListToStringListReturnsExpected() { List<BuilderTypeReference> types = new LinkedList<BuilderTypeReference>(); BuilderTypeReference typeRef1 = mock(BuilderTypeReference.class); BuilderTypeReference typeRef2 = mock(BuilderTypeReference.class); when(typeRef1.getType()).thenReturn("typeRef1"); when(typeRef2.getType()).thenReturn("typeRef2"); types.add(typeRef1); types.add(typeRef2); BuilderTypeList typeList = new BuilderTypeList(types); List<String> typeNames = Utils.builderTypeListToTypeNames(typeList); assertEquals(2, typeNames.size()); assertEquals("typeRef1", typeNames.get(0)); assertEquals("typeRef2", typeNames.get(1)); }