'When both ALPN and NPN are used, and both the client and server have
overlapping protocol choices, a protocol is successfully negotiated.
Further, the negotiated protocol is the first one in the list.'

def test_NPNAndALPNSuccess(self):

    protocols = ['h2', 'http/1.1']
    (negotiatedProtocol, lostReason) = negotiateProtocol(clientProtocols=protocols, serverProtocols=protocols)
    self.assertEqual(negotiatedProtocol, 'h2')
    self.assertIsNone(lostReason)
