code: public static <T> T read(String key, Class<T> classOfT) throws Exception {
  
          String json = cache.getString(key).getString();
          T value = new Gson().fromJson(json, classOfT);
          if (value == null) {
              throw new NullPointerException();
          }
          return value;
      }
docs: Get an object from Reservoir with the given key. This a blocking IO operation.
  
  @param key      the key string.
  @param classOfT the Class type of the expected return object.
  @return the object of the given type if it exists.