@Test
  public void testDestroy() {
    TProtocol prot = Mockito.mock(TProtocol.class);
    when(prot.getTransport()).thenReturn(Mockito.mock(TTransport.class));
    when(client.getInputProtocol()).thenReturn(prot);

    ThriftConnection<HelloClient> conn = new ThriftConnection<>(pool, host);
    conn.destroy();
    verify(pool).remove(conn);
  }