public String toString() {
    if (queryGuid == null) {
      return String.format("%s: %s", message, query);
    }

    return String.format("%s (%s): %s", message, queryGuid.getQueryGuid(), query);
  }
@Test
  public void toStringShouldReturnCorrectQueryLoggerMessageString() {
    // without query guid
    QueryLoggerMessage message = new QueryLoggerMessage(TEST_MESSAGE, TEST_QUERY);
    assertEquals("test message: describe stream1;", message.toString());

    // with query guid
    message = new QueryLoggerMessage(TEST_MESSAGE, TEST_QUERY, GUID);
    assertEquals(String.format("test message (%s): describe stream1;", GUID.getQueryGuid()), message.toString());
  }