ClientMetadata { public static ClientMetadata getInstance(Context context) { ClientMetadata result = sInstance; if (result == null) { synchronized (ClientMetadata.class) { result = sInstance; if (result == null) { result = new ClientMetadata(context); sInstance = result; } } } return result; } ClientMetadata(Context context); static ClientMetadata getInstance(Context context); static ClientMetadata getInstance(); String getOrientationString(); MoPubNetworkType getActiveNetworkType(); float getDensity(); String getNetworkOperatorForUrl(); String getNetworkOperator(); String getSimOperator(); String getIsoCountryCode(); String getSimIsoCountryCode(); String getNetworkOperatorName(); String getSimOperatorName(); synchronized String getAdvertisingId(); synchronized boolean isDoNotTrackSet(); synchronized void setAdvertisingInfo(String advertisingId, boolean doNotTrack); synchronized boolean isAdvertisingInfoSet(); String getDeviceManufacturer(); String getDeviceModel(); String getDeviceProduct(); String getDeviceOsVersion(); int getDeviceScreenWidthPx(); int getDeviceScreenHeightPx(); String getSdkVersion(); String getAppVersion(); String getAppPackageName(); String getAppName(); @VisibleForTesting static void clearForTesting();  }
@Test public void getWithoutContext_shouldReturnNull() { final ClientMetadata clientMetadata = ClientMetadata.getInstance(); assertThat(clientMetadata).isNull(); }
@Test public void getWithContext_shouldReturnInstance() { final ClientMetadata clientMetadata = ClientMetadata.getInstance(activityContext); assertThat(clientMetadata).isNotNull(); }
@Test public void getWithoutContextAfterInit_shouldReturnInstance() { ClientMetadata.getInstance(activityContext); final ClientMetadata clientMetadata = ClientMetadata.getInstance(); assertThat(clientMetadata).isNotNull(); }