examples/iot-nirvana/pipeline/src/test/java/com/google/cloud/demo/iot/nirvana/pipeline/FilterMessagesTest.java
/**
   * Safe JSON deserialization of a Message object, will be called only with valid messages for test
   * purposes.
   *
   * @param json
   * @return
   */
Safe JSON deserialization of a Message object, will be called only with valid messages for test
purposes.

@param json
@return
Safe JSON deserialization of a Message object will be called only with valid messages for test purposes . @param json @return
private static Message fromJsonSafe(String json) {
    Message message = null;
    try {
      message = Message.fromJson(json);
    } catch (FormatException e) {
    }
    return message;
  }
private static Message fromJsonSafe ( String json ) { Message message = null ; try { message = Message . fromJson ( json ) ; } catch ( FormatException e ) { } return message ; }
Safe JSON deserialization of a Message object, will be called only with valid messages for test
 purposes.
Safe JSON deserialization of a Message object will be called only with valid messages for test purposes .
// Nothing to do here, method will only be called with valid messages