def mock_response(flag):
    """Mock the call to the insights service."""
    class MockResponse:
        """Mock response object."""

        def __init__(self, json_data, status_code):
            """Create a mock json response."""
            self.json_data = json_data
            self.status_code = status_code

        def json(self):
            """Get the mock json response."""
            return self.json_data

    # return the URL to check whether we are calling the correct service.
    resp = {
        "requestId": "f98d1366-738e-4c14-a3ff-594f359e131c",
        "status": {
            "message": "",
            "code": 200,
            "attributes": {}
        },
        "result": {
            "data": [
                "a"
            ],
            "meta": {}
        }
    }

    resp_true = {"status": "Successful"}
    resp_false = {"status": "Unknown"}

    if flag is "false":
        return MockResponse(resp, 400)
    elif flag is "true":
        return MockResponse(resp, 200)
    elif flag is "lic_true":
        return MockResponse(resp_true, 200)
    elif flag is "lic_false":
        return MockResponse(resp_false, 200)