             ("testQueryNotices", testQueryNotices),
             ("testFederatedQuery", testFederatedQuery),
             ("testFederatedQueryNotices", testFederatedQueryNotices),
+            ("testCreateEvent", testCreateEvent),
+            ("testGetMetricsQuery", testGetMetricsQuery),
+            ("testQueryLog", testQueryLog),
+            ("testGetMetricsQueryEvent", testGetMetricsQueryEvent),
+            ("testGetMetricsQueryNoResults", testGetMetricsQueryNoResults),
+            ("testGetMetricsEventRate", testGetMetricsEventRate),
+            ("testGetMetricsQueryTokenEvent", testGetMetricsQueryTokenEvent),
             ("testListTrainingData", testListTrainingData),
             ("testTrainingDataCRUD", testTrainingDataCRUD),
             ("testDeleteAllTrainingData", testDeleteAllTrainingData),

        waitForExpectations(timeout: timeout)
    }

    // MARK: - Negative Tests

    func testGetEnvironmentWithInvalidID() {

        waitForExpectations(timeout: timeout)
    }

    func testCreateEvent() {
        // Create a test document
        let environmentID = environment.environmentID!
        let configurationID = lookupOrCreateTestConfiguration(environmentID: environmentID).configurationID!
        let collection = lookupOrCreateTestCollection(environmentID: environmentID, configurationID: configurationID)
        let document = addTestDocument(environment: environment, collection: collection)
        let collectionID = collection.collectionID!
        let documentID = document.documentID!

        // Make a query to get the session token
        let expectation = self.expectation(description: "createEvent")
        discovery.query(
            environmentID: environmentID,
            collectionID: collectionID,
            naturalLanguageQuery: "jeopardy",
            count: 1,
            failure: failWithError) { queryResponse in

                // Create the event
                let sessionToken = queryResponse.sessionToken!
                let eventData = EventData(
                    environmentID: environmentID,
                    sessionToken: sessionToken,
                    collectionID: collectionID,
                    documentID: documentID)

                self.discovery.createEvent(type: "click", data: eventData, failure: self.failWithError) { createEventResponse in
                    XCTAssertEqual(createEventResponse.data!.environmentID, eventData.environmentID)
                    XCTAssertEqual(createEventResponse.data!.sessionToken, eventData.sessionToken)
                    XCTAssertEqual(createEventResponse.data!.collectionID, eventData.collectionID)
                    XCTAssertEqual(createEventResponse.data!.documentID, eventData.documentID)
                    XCTAssertEqual(createEventResponse.type, "click")
                    expectation.fulfill()
                }
        }
        waitForExpectations(timeout: timeout)
    }

    func testGetMetricsQuery() {
        let expectation = self.expectation(description: "getMetricsQuery")
        discovery.getMetricsQuery(failure: failWithError) { _ in
            expectation.fulfill()
        }
        waitForExpectations(timeout: timeout)
    }

    func testQueryLog() {
        let expectation = self.expectation(description: "queryLog")
        discovery.queryLog(failure: failWithError) { _ in
            expectation.fulfill()
        }
        waitForExpectations(timeout: timeout)
    }

    func testGetMetricsQueryEvent() {
        let expectation = self.expectation(description: "getMetricsQueryEvent")
        discovery.getMetricsQueryEvent(failure: failWithError) { _ in
            expectation.fulfill()
        }
        waitForExpectations(timeout: timeout)
    }

    func testGetMetricsQueryNoResults() {
        let expectation = self.expectation(description: "getMetricsQueryNoResults")
        discovery.getMetricsQueryNoResults(failure: failWithError) { _ in
            expectation.fulfill()
        }
        waitForExpectations(timeout: timeout)
    }

    func testGetMetricsEventRate() {
        let expectation = self.expectation(description: "getMetricsEventRate")
        discovery.getMetricsQuery(failure: failWithError) { _ in
            expectation.fulfill()
        }
        waitForExpectations(timeout: timeout)
    }

    func testGetMetricsQueryTokenEvent() {
        let expectation = self.expectation(description: "getMetricsQueryTokenEvent")
        discovery.getMetricsQueryTokenEvent(failure: failWithError) { _ in
            expectation.fulfill()
        }
        waitForExpectations(timeout: timeout)
    }

    // MARK: - Training Data

    func testListTrainingData() {
