code: @SuppressWarnings("unchecked") // types must agree
    private static List createListObject(ParameterizedType type) {
  
      Class rawType = (Class) type.getRawType();
      Type[] genericTypes = type.getActualTypeArguments();
      List listObject;
  
      if (rawType.isInterface()) {
        listObject = new ArrayList(MOCK_LIST_COUNT);
      } else {
        listObject = (List) instantiateObject(rawType);
      }
  
      for (int i = 0; i < MOCK_LIST_COUNT; i++) {
        listObject.add(generateValue((Class) genericTypes[0]));
      }
  
      return listObject;
    }
docs: Creates and fills a List object.
  If defined as interface, creates an {@link java.util.ArrayList}.
  
  @param type Type of List.
  @return List object