### Question:
ThriftPlugin implements Plugin { @Override public Iterable<ConnectorFactory> getConnectorFactories() { return ImmutableList.of(new ThriftConnectorFactory(name, module)); } ThriftPlugin();  ThriftPlugin(String name, Module module); @Override Iterable<ConnectorFactory> getConnectorFactories();  }### Answer:
@Test public void testPlugin() { Plugin plugin = new ThriftPlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); assertInstanceOf(factory, ThriftConnectorFactory.class); Map<String, String> config = ImmutableMap.of("presto.thrift.client.addresses", "localhost:7779"); Connector connector = factory.create("test", config, new TestingConnectorContext()); assertNotNull(connector); assertInstanceOf(connector, ThriftConnector.class); }