code: public static NetworkInfo newInstance(
        NetworkInfo.DetailedState detailedState,
        int type,
        int subType,
        boolean isAvailable,
        NetworkInfo.State state) {
      NetworkInfo networkInfo = Shadow.newInstanceOf(NetworkInfo.class);
      final ShadowNetworkInfo info = Shadow.extract(networkInfo);
      info.setConnectionType(type);
      info.setSubType(subType);
      info.setDetailedState(detailedState);
      info.setAvailableStatus(isAvailable);
      info.setConnectionStatus(state);
      return networkInfo;
    }
docs: Allows developers to create a {@link NetworkInfo} instance for testing.