def METHOD_NAME(self):
    """Test correct initialization. Server ends connection."""
    server = SSEMockServer()
    server.start()
    events = []
    def callback(event):
        """Callback."""
        events.append(event)
    client = SSEClient(callback)
    def runner():
        """SSE client runner thread."""
        assert client.start('http://127.0.0.1:' + str(server.port()))
    client_task = threading.Thread(target=runner, daemon=True)
    client_task.setName('client')
    client_task.start()
    server.publish({'id': '1'})
    server.publish({'id': '2', 'event': 'message', 'data': 'abc'})
    server.publish({'id': '3', 'event': 'message', 'data': 'def'})
    server.publish({'id': '4', 'event': 'message', 'data': 'ghi'})
    time.sleep(1)
    server.publish(server.VIOLENT_REQUEST_END)
    server.stop()
    time.sleep(1)
    assert events == [
        SSEEvent('1', None, None, None),
        SSEEvent('2', 'message', None, 'abc'),
        SSEEvent('3', 'message', None, 'def'),
        SSEEvent('4', 'message', None, 'ghi')
    ]
    assert client._conn is None