GsonUtils { public static synchronized Gson getGson() { if (sGson == null) { Timber.d(TAG, "creating Gson instance"); sGson = new GsonBuilder() .registerTypeAdapter(AbsNotification.class, AbsNotification.JSON_DESERIALIZER) .registerTypeAdapter(AbsNotification.AbsSource.class, AbsNotification.AbsSource.JSON_DESERIALIZER) .registerTypeAdapter(AbsStory.class, AbsStory.JSON_DESERIALIZER) .registerTypeAdapter(AbsSubstory.class, AbsSubstory.JSON_DESERIALIZER) .registerTypeAdapter(MediaStory.AbsMedia.class, MediaStory.AbsMedia.JSON_DESERIALIZER) .registerTypeAdapter(Rating.class, Rating.JSON_DESERIALIZER) .registerTypeAdapter(ReadingStatus.class, ReadingStatus.JSON_DESERIALIZER) .registerTypeAdapter(SearchBundle.AbsResult.class, SearchBundle.AbsResult.JSON_DESERIALIZER) .registerTypeAdapter(SimpleDate.class, SimpleDate.JSON_DESERIALIZER) .registerTypeAdapter(SimpleDate.class, SimpleDate.JSON_SERIALIZER) .registerTypeAdapter(User.class, User.JSON_DESERIALIZER) .registerTypeAdapter(UserDigest.Favorite.AbsItem.class, UserDigest.Favorite.AbsItem.JSON_DESERIALIZER) .registerTypeAdapter(UserDigest.Favorite.AbsItem.class, UserDigest.Favorite.AbsItem.JSON_SERIALIZER) .registerTypeAdapter(WatchingStatus.class, WatchingStatus.JSON_DESERIALIZER) .serializeNulls() .create(); } return sGson; }  static synchronized Gson getGson();  }
@Test public void testGetGson() { assertNotNull(GsonUtils.getGson()); }