{
ThriftCodecManager codecManager = new ThriftCodecManager();
ThriftServiceProcessor processor = new ThriftServiceProcessor(codecManager, ImmutableList.<ThriftEventHandler>of(), new GenericService());
try (ThriftServer server = new ThriftServer(processor, new ThriftServerConfig()).start();
ThriftClientManager clientManager = new ThriftClientManager(codecManager)) {
ThriftClient<GenericInterface.Client> clientOpener = new ThriftClient<>(clientManager, GenericInterface.Client.class);
try (GenericInterface.Client client = clientOpener.open(new FramedClientConnector(HostAndPort.fromParts("localhost", server.getPort()))).get()) {
GenericStruct<String> original = new GenericStruct<>();
original.genericField = "original.genericField";
GenericStruct<String> copy = client.echo(original);